Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   install a desktop icon (http://forums.winamp.com/showthread.php?t=300606)

teebird 3rd December 2008 15:47

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.

Animaether 3rd December 2008 17:50

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).

teebird 3rd December 2008 19:05

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.

Afrow UK 3rd December 2008 21:32

If there is no icon present then your path must be incorrect or you are setting an icon yourself which is incorrect.

Stu

teebird 4th December 2008 07:02

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?

Anders 4th December 2008 07:26

so why set the icon to 0?

all you need is: CreateShortCut "$DESKTOP\Program.lnk" "$INSTDIR\Program.exe"

teebird 4th December 2008 16:35

>>so why set the icon to 0?

Because I'm dense?

Hey, removing the zero worked!

Thanks for the help :)


All times are GMT. The time now is 04:42.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.