Archive: Running a .VBS script with arguments from within NSIS script


Running a .VBS script with arguments from within NSIS script
Hello,

I have a .VBS script written which accepts input from commandline and updates another file accordingly. I found that executing a .VBS script from within NSIS script is bit different than running any other commands using Exec / ExecWait / nsExec::Exec.

Below is the command which I want to execute from NSIS script.

Updateini.vbs C:\TS_Installation\CustomPage\INIupdate\setup.iss szDir C:\Prak

Updateini.vbs is the file which want to execute with 3 parameters passed [Underlined], which I am able to execute from command prompt successfully.

Nsis syntax I tried:

ExecWait ' "$SYSTEM\CScript.exe" Updateini.vbs C:\TS_Installation\CustomPage\INIupdate\setup.iss szDir C:\Prak '

ExecWait ' "$SYSDIR\wscript.exe" Updateini.vbs C:\TS_Installation\CustomPage\INIupdate\setup.iss szDir C:\Prak '

ExecWait ' "cscript" Updateini.vbs C:\TS_Installation\CustomPage\INIupdate\setup.iss szDir C:\Prak '

I am just not getting it right with the NSIS syntax of executing .VBS script.

Could someone point out and tell me where I am going wrong?

Thanks in advance !!


ExecWait '"$SYSDIR\wscript.exe" //E:vbscript "$instdir\yourscript.vbs" "param1" "param2" "param3"'


Thank you Anders !!! It helped a lot


Command line parameters for ExecWait
Hi,

I want to install vcredist_x86.exe in silent mode in my NSIS installer.

ExecWait '"$INSTDIR\vcredist_x86.exe" /SILENT'


But I can't install it, because the Windows installer of vcredist needs the following user parameters:
1) click CheckBox to accept license
2) click button "Install"
3) click button "Finish"

How can I write this parameters in the command line?
I've checked already several threads, but I can't find the right answer for my problem...
(e.g. http://forums.winamp.com/showthread.php?threadid=267834)

Thanks for help