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
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.
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
File Hash Generator Online – Get Instant MD5 and SHA-256 Hashes
Visual CSS Editor for Modern Glass UI Effects
Glassmorphism CSS Generator with Live Preview
Online Hash Generator - String to Hash Converter
Convert CSV To HTML Table
Convert Json To Xml