How to Create Desktop Shortcuts with Icons from EXE Files?

0
0
Asked By TechTraveler42 On

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?

2 Answers

Answered By CodeNinja07 On

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.

Answered By ScriptWizard99 On

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.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.