whoops
19th December 2008 15:30 UTC
How to make a Shortcut
Hi, I'm new to this program and I was wondering how you would make it so that the installer would make a shortcut on the desktop after the files are installed. I have searched around and I am puzzled on what to do. Any help will be appreciated. Thanks
P.S.
I found this and I don't know what to do with it or where to put it...
CreateShortCut "$DESKTOP\Program.lnk" "$INSTDIR\Program.exe" ""
Anders
19th December 2008 15:40 UTC
just put it on a section
...or if you are talking about a checkbox on the finish page (Using Modern UI), you would use a function callback, see the Modern UI docs for info about that
whoops
19th December 2008 15:47 UTC
Alright, All I need now is to know what section of what .NSI to put it in, Base or Modern. Also, I am just going to make it do it automatically so they don't need to check any boxes.
I did say I was new to this right? haha
Yathosho
19th December 2008 16:00 UTC
you can simply use a section just for the creation of a shortcut
Section "Create Desktop-Shortcut"
CreateShortCut "$DESKTOP\Program.lnk" "$INSTDIR\Program.exe" ""
SectionEnd
that way the user can enable or disable it, which is recommended
also have a look at
Sections for further options
Anders
19th December 2008 16:04 UTC
Originally posted by whoops
I did say I was new to this right? haha
Maybe you should take some time and look at some of the examples that ship with nsis then
whoops
19th December 2008 16:09 UTC
Ok, I figured out where to put it and makes the shortcut, but the shortcut doesn't work. When I click on it, it says that it can't find the file that its supposed to run. I tried a few things like changing the directory and stuff but I don't know what to do from here.
Originally posted by Anders
Maybe you should take some time and look at some of the examples that ship with nsis then
I did and I couldn't figure out this so, I asked on here