Skip to content
⌘ NSIS Forum Archive

nsis Exec: failed createprocess

4 posts

graz79#

nsis Exec: failed createprocess

My installer ships a vbs install script to create the SQL database and IIS website. Run manually the vbs file completes.
Within my NSI script i have the following
Section CreateDB
detailprint "Creating SQL database on $DBNAME"
ExecWait '"$INSTDIR\install\install.vbs" "$DBNAME" "$DBLOGIN" "$DBPASSWORD" "$APPNAME" "$WEBIP"'
IfErrors +1 +2
LogText 'Error running "$INSTDIR\install\install.vbs" "$DBNAME" "$DBLOGIN" "$DBPASSWORD" "$APPNAME" "$WEBIP"'
SectionEnd
Using the NSIS installer i get the following error in the logs

Exec: failed createprocess
for this command.

I need this script to execute before the installer exits. Can anyone shed any light or recommend and alternative?

Thanks
Graz
Takhir#
Exec starts executable, not script, shell required to run vbs. And Forum Search is you best friend 😉
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.

If this opens black console window, you can take vbs extension handler from Registry (what ExecShell does) and run it using nsExec (included to distribution) or ExecDos plug-in (from Dev. center).
graz79#
Thanks a lot

But i know get this

ExecShell: warning: error ("OPEN": file:""C:\Program Files\TrustNET\install\install.vbs" "Melbourne" "sa" "surfsup" "TrustNET" "192.168.1.200" "C:\Program Files\TrustNET"" params:"SW_SHOWNORMAL")=2

My script returns 100 not 2 on an error i.e. WScript.Quit(100)
demiller9#
Use Exec (or NsExec::Exec) with "Wscript.exe $PROGRAMFILES\TrustNET\install\install.vbs Melbourne sa surfsup TrustNET 192.168.1.200 $PROGRAMFILES\TrustNET"