VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Someone in another thread asked how to run DOSBox from VisualBasic. The following VBS code does the job. Save as SomeFileName.vbs and run it:

Dim sCmd
sCmd="d:\Full\Path\To\Dosbox.exe -noconsole"
Set oShell = WScript.CreateObject("WScript.Shell")
oShell.exec(sCmd)
Set oShell=Nothing

The -noconsole switch is there only as an example; you can of course put in any switches you like or use the contents of a variable created earlier in the same script.

The final line isn't really necessary, but is useful if you're going to do anything else in the script.