The IconIndex for this interface works top to bottom, starting with 0. Many encountered the same problem. r/Batch is all about the Batch scripting language, which runs in the windows CMD language. Your batch file opens Firefox in an open window for me. Distributing desktop shortcut file across network - not keeping custom icon Change the icon and browse to c:\windows\system32. 5. Not being so script-savvy myself, I would take a target machine with the application (s) on it, create a shortcut, then change the icon. and here is the BATCH code. Rebuild Icon Cache in Windows 10 | Tutorials - Ten Forums How to create a batch file shortcut and change its icon - YouTube I dragged and dropped a file (of any file type) to the shortcut link on the desktop. You may get a warning about your file containing no icons, but click "OK" and icons that you can choose from will appear. Creating a Shortcut from the command line (batch file) - XXCOPY have the possibility to have a shortcut directly t... - Power Platform ... Adding Desktop shortcut and Icon using a logon script - nunoines 6 Ways To Change the Windows Folder Icon To Another Icon For the location of the item, you should enter the following: wscript.exe "C:\wsl\bat-launcher.vbs" "<batch-file-name>". I've been doing/recommending the long way (copy & pasted from my tips & tricks folder): To Rebuild icon cache follow the below mentioned steps. Next I would move that icon link to my MDT server and test out an 'xcopy' command to copy it to the public desktop folder and see if it launches the app. Naturally, it would be useful to automate the process of making a shortcut using a batch file. Quick . In the 'Change Icon' dialog, the index value of the top-left icon is '0'. Click Browse and locate a custom icon file or a file which includes the icon you want to use. Log in to follow creators, like videos, and view comments. Then follow the instructions for adding the /C and your path to the batch file like "C:\Windows\System32\cmd.exe /C C:\temp\mybatfile.bat" as the full command like and it runs (beautifully) any thing the batch file in "C:\temp\mybatfile.bat" has in it. This starts a command prompt window which pops up momentarily, which is confusing for a user. IcoFX - Support Empty or reset icon cache on Windows 11, 10, etc.! Step 3: Now Right Click your shortcut and now you can see the option Pin to Taskbar. It follows this format: \\(SERVERNAME)\sysvol\(DOMAIN NAME)\scripts Change Icon. Can an icon be set only of a shortcut , or can i set the icon of the main batch file whose shortcut needs to be created. mklink "C:\users\public\desktop\Logoff" "C:\windows\system32\logoff.exe". I've created a batch file to create a new folder on user's C: (in \program files (x86)), copy an Access database and associated icon into that location, and then copy a shortcut to the user's desktop.