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


Please log in to comment

Community Chosen Answer


If you're going to lead with your chin...



Answered 05/03/2013 by: VBScab
Red Belt

Please log in to comment



Here is a function for what you want:


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
Answered 05/16/2013 by: terebent
Brown Belt

Please log in to comment
Answer this question or Comment on this question for clarity