Archive: ExecWait for a VBScript


ExecWait for a VBScript
Hi all,

I have a short VBScript that enables an Excel add-in, and it runs beautifully when I double-click the icon. I want my NSIS-made installer to execute the VBS, but the it doesn't seem to be working. What could be wrong?

Below are the relevant lines of my NSIS script.

Section
CreateDirectory "C:\dir\"
SetOutPath "C:\dir\"
File /r "C:\dir\install_xla.vbs"
File /r "C:\dir\theExcelAddIn.xla"
ExecWait "C:\dir\install_xla.vbs"
SectionEnd

Thanks for any help you can give!


If you don't need to wait, ExecShell would work, if not:

ExecWait '"$sysdir\wscript.exe" "C:\dir\install_xla.vbs"' or something like that (.vbs is not a executable format, you need to invoke its script parser)

Windows could be set to use the console version as the default, if you really want to have it behave as the host system no matter what, the UAC plugin has ExecShellWait (the default action could be to edit the script aswell, so it might not be the best option)


Sweet, that's just what I needed to know! Thanks for the help.