|
|
#1 |
|
Junior Member
Join Date: Dec 2008
Posts: 9
|
install a desktop icon
I can't find documentation anywhere on how to have the NSIS installer create a Windows desktop icon for the user.
The shortcut is going into the start-menu just fine. Can you help? Thanks. |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
You use the same command - CreateShortCut, except instead of $SMPROGRAMS you use $DESKTOP. Like $SMPROGRAMS, it depends on SetShellVarContext to determine whether it's the current user's desktop only - or all users' (must be admin/etc. if on a limited account machine).
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2008
Posts: 9
|
Thanks, that works, but the icon has no picture associated with it, as it does when I create a shortcut from my program executable by hand.
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
If there is no icon present then your path must be incorrect or you are setting an icon yourself which is incorrect.
Stu |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Dec 2008
Posts: 9
|
Here is the line in my .nsi file:
CreateShortCut "$DESKTOP\Program.lnk" "$INSTDIR\Program.exe" "" 0 An icon is placed on the desktop. There is no icon associated with it. Although, the correct icon is shown when I create the shortcut by hand, not using NSIS. Any clues? |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
so why set the icon to 0?
all you need is: CreateShortCut "$DESKTOP\Program.lnk" "$INSTDIR\Program.exe" IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Dec 2008
Posts: 9
|
>>so why set the icon to 0?
Because I'm dense? Hey, removing the zero worked! Thanks for the help
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|