windows installer - VBScript will not execute correctly from MSI file -
i have vbscript wrote needs executed msi file. script correctly executes when run within windows on own, however, when run installer following error shown in log file:
microsoft vbscript runtime error: object required: 'wscript', line 3, column 2 the script below:
sub shell(cmd) set objshell = wscript.createobject("wscript.shell") objshell.run("""" & cmd & """") set objshell = nothing end sub set objfso = createobject("scripting.filesystemobject") strcmd32 = "c:\path\pathtoexecutable.exe" strcmd64 = "c:\path\pathtoexecutable64.exe" if (objfso.fileexists(strcmd32)) shell(strcmd32) else shell(strcmd64) end if set objfso = nothing as stated before, script runs fine if run outside context of installer. setup project type vs2010 setup , deployment package (this client wishes use , cannot use else). ideas?
in "shell" sub, removed wscript first line before call "createobject()". amended line looks this:
'note absent reference wscript on call createobject() set objshell = createobject("wscript.shell")
Comments
Post a Comment