Archive: How to add an icon to a URL shortcut?


How to add an icon to a URL shortcut?
Here's my code so far but it puts an IE looking page icon on my desktop instead of the red.ico file that I want on the desktop. How do I make the actual desktop icon work?

WriteINIStr "$DESKTOP\$(^Name).url" "InternetShortcut" "${NSISDIR}\Contrib\Graphics\Icons\red.ico" "www.MyDomain.com/MyPage.html"

Thanks!


http://nsis.sourceforge.net/CreateIn...o_%26_function


${NSISDIR} is a path on the system you compile on and can NOT be used in a shortcut, you must copy the icon to the users system and then use a path like "$instdir\youricon.ico"


Yes and you're not creating the .url file correctly anyway. Check that link jpderuiter posted. And yes the icon must exist on the destination machine so you should either extract one specially or use your application executable's icon (might need ,0 at the end of the icon path).

Stu