g2g
8th November 2006 12:07 UTC
Problem with Create Shortcut
Hi;
I´m a newbie with NSIS.
I try to create an installer using the Wizard of HM NSIS Editor.
It works fine. I try to create a shortcut on the desktop, but it don´t work.
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\MyApp.lnk" "$INSTDIR\directory\start.bat"
the shortcut is created on the desktop. But when I look at the properties the value of the parameter 'start in' is wrong.
Could I change this value anywhere in my script?
Thanks for helping
Kind regards
g2g
Anders
8th November 2006 12:37 UTC
use SetOutPath before you call CreateShortCut
g2g
8th November 2006 12:52 UTC
Hi Anders;
i already use the Command SetOutPath before i create the ShortCut.
SetOutPath "$INSTDIR"
SetOverwrite try
File /r "directory"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\MyApp.lnk" "$INSTDIR\directory\start.bat"
I attached a image, that shows the properties of the shortcut.
The value of the parameter should be "C:\Program Files\MyApp" instead of "C:\Program Files\MyApp\directory\xxx"
Thanks for helping
g2g
g2g
8th November 2006 12:55 UTC
sorry the image isn´t attached.
i try it one more time.
kichik
8th November 2006 18:25 UTC
Works fine for me. Which version of NSIS are you using? Could you attach the installation details (right click on it in the instfiles page and choose Copy Details to Clipboard)?
g2g
9th November 2006 08:52 UTC
Hi @ll;
i fixed the problem. The shortcut works.
Anders was wright. The value of SetOutPath was wrong. I had to change it before i create the shortcuts.
Another question.
I also try to run my Application after the install.
HM NSIS Editor creates following Code:
!define MUI_FINISHPAGE_RUN "$INSTDIR\jakarta-tomcat-5.5.9\bin\startup.bat"
!insertmacro MUI_PAGE_FINISH
It´s the same file, that my shortcut is joined to.
But the application doesn´t start up correctly.
Are there any details (parameters) i have to attend?
Do you have any ideas?
Thanks a lot for your support!
Regards
g2g
Anders
9th November 2006 15:16 UTC
you probably have the same "current directory" problem, try executing the .lnk instead of the .bat on the finish page. Or if the shortcut is optional, you can use a function callback on the finish page instead of executing something directly, that should give you more control