Running Applications

When you need your script to launch another application, use WshShell’s Run method:

Run strCommand, [intWindowStyle], [bWaitOnReturn]

strCommand

The name of the file that starts the application. Unless the file is in the Windows folder, you should include the drive and path to make sure that the script can find the file.

intWindowStyle

A constant or number that specifies how the application window will appear. These are some of the more useful values:

 

intWindowStyle

Window Appearance

 

0

Hidden

 

1

Normal size with focus

 

2

Minimized with focus (this is the default)

 

3

Maximized with focus

 

4

Normal without focus

 

6

Minimized without focus

bWaitOnReturn

A Boolean value that determines whether the application is run asynchronously. If this value ...

Get Insider Power Techniques for Microsoft® Windows® XP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.