• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. File and Registry Access > Manipulating Programs and Shortcuts

Manipulating Programs and Shortcuts

You will sometimes want a script to run an external program such as Notepad, the sort command, or some other type of utility program. You might do this when writing a script to automatically collect and process information. You may also wish to have a script create desktop and Start menu shortcuts, as part of an installation routine, during logon, or for network maintenance. All these tasks can be managed using the WScript.Shell object. The word shell is a generic term for the command interface that computer users interact with to run programs. In the case of Windows XP, the shell is the desktop, a display managed by Windows Explorer.

The WScript.Shell Object

Like WScript.FileSystemObject, WScript.Shell is a utility object provided with Windows Script Host. WScript.Shell provides a way of interacting with the Windows program execution environment and Windows Explorer. This object's properties and methods let you interact with special folders, such as Desktop and My Documents, run programs, manage shortcuts, and examine environment variables, such as Path. WScript.Shell also lets you work with the Windows Registry, which is discussed in a later section. The properties and methods of the WScript.Shell object are listed in Reference List 4.9.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint