Old 19th December 2008, 14:30   #1
whoops
Junior Member
 
Join Date: Dec 2008
Posts: 3
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...
Quote:
CreateShortCut "$DESKTOP\Program.lnk" "$INSTDIR\Program.exe" ""
whoops is offline   Reply With Quote
Old 19th December 2008, 14:40   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
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

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 19th December 2008, 14:47   #3
whoops
Junior Member
 
Join Date: Dec 2008
Posts: 3
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

Last edited by whoops; 19th December 2008 at 15:03.
whoops is offline   Reply With Quote
Old 19th December 2008, 15:00   #4
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
you can simply use a section just for the creation of a shortcut

code:
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
Yathosho is offline   Reply With Quote
Old 19th December 2008, 15:04   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
Quote:
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

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 19th December 2008, 15:09   #6
whoops
Junior Member
 
Join Date: Dec 2008
Posts: 3
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.

Quote:
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

Last edited by whoops; 19th December 2008 at 15:29.
whoops 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