Old 21st January 2011, 02:05   #1
ScotK
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"

Thanks!

Last edited by ScotK; 21st January 2011 at 03:07.
ScotK is offline   Reply With Quote
Old 21st January 2011, 07:19   #2
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
http://nsis.sourceforge.net/CreateIn...o_%26_function
jpderuiter is offline   Reply With Quote
Old 21st January 2011, 13:38   #3
Anders
Moderator
 
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
Moderator
 
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).

Stu
Afrow UK is offline   Reply With Quote
Reply
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