How to run setup exe from vbscript?
I am working on MS Project 2010. I created msp using OCT, and need to run the setup.exe from vbscript wrapper for install and uninstall. How to write a script to run exe from VBScript? Thanks in advance.
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
anonymous_9363
11 years ago
Posted by:
terebent
11 years ago
Here is a function for what you want:
'Usage
Launch_App setup.exe, "arg" 'you can put any switch you want.
Function Launch_App (strExePath, strArg)
Dim strScriptPath : strScriptPath = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")-1)
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run """" & strScriptPath & "\" & strExePath & """" & " " & strArg,,True
End Function