cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
jan_solo
Level III

JSL: Open a VBS script

Hi everyone,

 

Is there a way to start a .vbs (visual basic script) from a jsl-script?

It is possible if I make an .exe file from the vbs and run it with Run Program(), but due to tech reasons, I prefer to run the actual .vbs.

 

Run Program (Executable("c:\path\VbsAsExe.exe"));

 

Thanks,

 

Jan

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: JSL: Open a VBS script

You can use either the WScript or CScript executables to run a VBScript file using RunProgram. The only difference is that WScript will show errors in a MessageBox, whereas CScript writes the error to the console/stdout.

Here is an example using CScript. 

rp = RunProgram( Executable( "CSCRIPT.EXE" ), Options( "\!"C:\runMe.vbs\!"" ), Read Function( "text" ) );
Justin

View solution in original post

1 REPLY 1

Re: JSL: Open a VBS script

You can use either the WScript or CScript executables to run a VBScript file using RunProgram. The only difference is that WScript will show errors in a MessageBox, whereas CScript writes the error to the console/stdout.

Here is an example using CScript. 

rp = RunProgram( Executable( "CSCRIPT.EXE" ), Options( "\!"C:\runMe.vbs\!"" ), Read Function( "text" ) );
Justin