/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: anonymous_9363 11 years ago
Red Belt
2

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

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

 

Posted by: terebent 11 years ago
Second Degree Brown Belt
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
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ