How to Create Desktop Shortcuts with Icons from EXE Files?
Asked by
TechTraveler42
I'm trying to deploy a desktop shortcut that uses an icon from an EXE file, but I've run into some trouble. When I was using Group Policy Preferences, it worked fine, but now I'm attempting to do this with PowerShell, and it seems like the EXE file isn't being recognized for the icon, even though normal .ICO files are. Has anyone managed to get this to work?
Answers
You can actually do this using WScript, though I haven't liked going that route lately since VBS is being phased out. I usually take the lazy route and use PowerShell to grab the base64 string of a working .lnk file from another PC and then create that file on the client's machine by decoding the string. This method has worked for me with my recent app deployments without any hiccups.
Reply to this answer
I haven't worked on shortcuts specifically, but I did create a script called Set-FolderIcon that might be similar to what you're looking for. You can check it out on the PowerShell Gallery. It might give you some ideas on how to achieve your goal.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions