3:48:36 PM Using VBScript to run a program
VBScript can be used instead of a batch file to perform setup and cleanup operations before and after running another program.
For games, we might need to:
- load the CD image
- change controller preferences
- change screen resolution
The VBScript syntax is: object.Run(strCommand, [intWindowStyle], [bWaitOnReturn{=false}])
Dim oShell Set oShell = WScript.CreateObject ("WSCript.shell") oShell.run "cmd /K CD C:\ & Dir" Set oShell = Nothing
For Paragon CD-ROM Emulator, the command line would be: Cdman /command:e'-”T”,i-"T=E:cdthe image.cdi”
This "ejects" any CD already in drive T (the ' in e' is an optional apostrophe used to tell it to continue after any errors - like no CD mounted).
|