Old 21st January 2011, 02:05   #1
Junior Member
Join Date: Jan 2011
Posts: 1
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"


Last edited by ScotK; 21st January 2011 at 03:07.
ScotK is offline   Reply With Quote
Old 21st January 2011, 07:19   #2
Major Dude
Join Date: Feb 2007
Posts: 672
jpderuiter is offline   Reply With Quote
Old 21st January 2011, 13:38   #3
Anders's Avatar
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,485
${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"

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 21st January 2011, 15:32   #4
Afrow UK
Afrow UK's Avatar
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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).

Afrow UK is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump