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

Comments

Please log in to comment

Community Chosen Answer

2

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

http://lmgtfy.com/?q=run+exe+vbscript

 

Answered 05/03/2013 by: VBScab
Red Belt

Please log in to comment

Answers

1

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

Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share