Darktrain
17th December 2001 12:39 UTC
Some questions (reboot, shortcut, exec)
Hi,
Im creating an installer using nsis and ive got a few questions.
- After installing everything I want to reboot the computer. I show a messagebox with 'reboot ok Y/N'. If i reboot at the end, the uninstall.exe will not be created because the installer wasn't completed. How can i change this?
- Im also creating some lnk's in $smstartup/$smprograms. But they dont working right. The 'target' is good $INSTDIR\app\app.exe but 'start in' is the $INSTDIR instead of $INSTDIR\app. So its missing the shortcut. Do i give the wrong parameters or something?
- BTW is it possible to execute the follow command: php -q filename.php? im using a .bat file now.
regards,
Darktrain
crish
17th December 2001 13:44 UTC
Re: Some questions (reboot, shortcut, exec)
Originally posted by Darktrain
Hi,
Im creating an installer using nsis and ive got a few questions.
- After installing everything I want to reboot the computer. I show a messagebox with 'reboot ok Y/N'. If i reboot at the end, the uninstall.exe will not be created because the installer wasn't completed. How can i change this?
just use
Function .onInstSuccess
MessageBox MB_YESNO "Reboot?" IDNO NoReBoot
Reboot
NoReBoot:
FunctionEnd
works in 1.90
- Im also creating some lnk's in $smstartup/$smprograms. But they dont working right. The 'target' is good $INSTDIR\app\app.exe but 'start in' is the $INSTDIR instead of $INSTDIR\app. So its missing the shortcut. Do i give the wrong parameters or something?
fore sure
:)
post the code ...
- BTW is it possible to execute the follow command: php -q filename.php? im using a .bat file now.
just use
open ".."
regards,
Darktrain
Darktrain
7th January 2002 15:37 UTC
Hi crish,
Here is the code im using:
CreateDirectory "$SMPROGRAMS\Mysoft"
CreateShortCut "$SMPROGRAMS\Mysoft\Myapp.lnk"
"$INSTDIR\Myapp\Myapp.exe" "" "$INSTDIR\Myapp\Myapp.exe" 0
When i look to the properties of this lnk;
The 'target' is good $INSTDIR\myapp\myapp.exe but 'start in' is the $INSTDIR instead of $INSTDIR\app. So its missing the shortcut.
It needs some information from a ini file($INSTDIR\myapp\file.ini). For some app the code is working correct (are also need some information from a ini file).
I hope you can help me.
Regards,
flizebogen
10th January 2002 07:41 UTC
To change the Directory at start in you have to use the following
SetOutPath $INSTDIR\App
CreateShortCut "$SMPROGRAMS\Mysoft\Myapp.lnk" "$INSTDIR\Myapp\Myapp.exe" "" "$INSTDIR\Myapp\Myapp.exe" 0
Because SetOutPath determinate the working directory for Shortcuts
If you need to Read from an ini file use the following
ReadIniStr $0 filename section entry
the value is stored in variable $0
when nothing is found the string is empty (taken from makensis.htm)
i hope it helps a bit
Darktrain
11th January 2002 10:21 UTC
It helped. Thanks!
//Darktrain