Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 31st March 2008, 20:49   #1
jb53403
Junior Member
 
Join Date: Mar 2008
Posts: 2
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!
jb53403 is offline   Reply With Quote
Old 31st March 2008, 21:05   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,813
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)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 31st March 2008, 22:46   #3
jb53403
Junior Member
 
Join Date: Mar 2008
Posts: 2
Sweet, that's just what I needed to know! Thanks for the help.
jb53403 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump