The Community is now in read-only mode to prepare for the launch of the new Flexera Community. During this time, you will be unable to register, log in, or access customer resources. Click here for more information.

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

VB Script Experts Please..... Urgent

sk_jain2000
By
Level 6
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

rcrusco
By
Level 4
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

TsungH
By
Level 12
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.