Skip to Content
Windows Me Annoyances
book

Windows Me Annoyances

by David A. Karp
March 2001
Intermediate to advanced
480 pages
14h 8m
English
O'Reilly Media, Inc.
Content preview from Windows Me Annoyances

Running Applications from Scripts

This code is used to run a program, which can be a DOS program, a Windows application, an Internet or mailto URL, or anything else you might normally type in the Start Menu’s Run command. Place this subroutine in your scripts:

Sub RunProgram(Filename, Wait)
  Set WshShell = WScript.CreateObject("WScript.Shell")
  RetVal = WshShell.Run(Filename, Wait)
End Sub

and call the routine like this:

Call RunProgram("c:\windows\notepad.exe", True)

You can replace True with False if you don’t want to wait for the program to finish before the next script command is executed.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Windows XP Professional: The Missing Manual

Windows XP Professional: The Missing Manual

David Pogue, Craig Zacker, L.J. Zacker
Windows XP Pro: The Missing Manual, Second Edition

Windows XP Pro: The Missing Manual, Second Edition

David Pogue, Craig Zacker, L.J. Zacker
Windows XP in a Nutshell, Second Edition

Windows XP in a Nutshell, Second Edition

David A. Karp, Tim O'Reilly, Troy Mott

Publisher Resources

ISBN: 059600060XCatalog PageErrata