Wednesday 2 July 2008

How to run an exe from a vbs?

If you want to call an EXE from within your VBS code you can make use of Windows Script Host (WSH). Click here for an article on WSH.

Below is an example of creating a shell object to call the EXE:

Set wshShell = CreateObject("Wscript.Shell")
Int returnCode =
wshShell.Run("C:\MyProgram.exe", 0, true)

No comments: