![]() |
#1 |
Junior Member
Join Date: May 2011
Posts: 9
|
![]()
I need to change the path at runtime. It would be the same command as the "change directory" cd. How can I do this in NSIS?
!define OCS_INSTALL_FILE "C:\ocs\install\ocs_setup.exe" !define OCS_INSTALL_OPTIONS "/S /NP /NO_SYSTRAY /NOSPLASH /NO_SERVICE" !define OCS_SERVER "http://myserver.com/ocsinventory" ExecWait "'${OCS_INSTALL_FILE} ${OCS_INSTALL_OPTIONS} /SERVER=${OCS_SERVER}'" The command "ExecWait" not working if called with the provided path. It only works if I call the direct path but for that I need to change the path. ExecWait "ocs_setup.exe" is fine. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Mar 2006
Location: Dallas
Posts: 462
|
SetOutPath C:\ocs\install
|
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: May 2011
Posts: 9
|
No, the problem is not just this. The problem is that "ocs_setup.exe" can only be executed if he is in the same way my NSIS installer.
An example: if I save my instalador_nsis.exe and ocs_setup.exe in the directory. c:\ocs\ocs_setup.exe c:\ocs\my_install.exe The way it works above. If the way down, does not work: c:\ocs\install\ocs_setup.exe c:\ocs\my_install.exe |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: May 2011
Posts: 9
|
Resolved, added 'at the beginning and end of the path variable in ExecWait. Thank you for your attention.
|
![]() |
![]() |
![]() |
#5 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You should never use relative paths. If you do need a path relative to the running installer, use $EXEDIR\.... And yes, you need quotes (the manual clearly states this). They should be double quotes too, so '"[path]"'.
Stu |
![]() |
![]() |
![]() |
#6 |
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
I don't think you need double quotes for any NSIS command. ' or ` work fine too.
|
![]() |
![]() |
![]() |
#7 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
|
![]() |
![]() |
![]() |
#8 |
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
Oh I see, the manual does show
ExecWait '"$INSTDIR\someprogram.exe"' as the example. Guess it's the same as what Anders and I discussed about putting the ARP uninstall path between quotes. I'll add it to my checklist. :P |
![]() |
![]() |
![]() |
|
Tags |
change, directory |
Thread Tools | Search this Thread |
Display Modes | |
|
|