A new Flexera Community experience is coming on November 18th, click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VB Script Experts Please..... Urgent

I need to run a .exe with path setting.. i have a cmd version..

set path="c:\program files\abs\xya"; %path%
Start "C:\program files\abc\abc.exe"

I need vb script version of this...

Thanks
(2) Replies
This should work, I havent tested it though

On Error Resume Next
Set objShell = WScript.CreateObject ("WSCript.shell")
objShell.run "cmd set path=%programfiles%\abs\xya;%path%"
objShell.run "cmd start %programfiles%\abc\abc.exe"
Set objShell = Nothing
In a VBScript custom action, WScript object cannot be referenced. Hence, the script should be as followed. In addition, I will leave out On Error Resume Next during testing, and include only if errors during script execution aren't critical to the installation process.
Set objShell = CreateObject ("WSCript.shell")


Automation Interface Reference will be a good starting point for VBScript custom action. Of all, Session object will used extenisvely.