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

Windows Script Host

In the last decade or so, Microsoft has worked diligently to provide ways for programmers to gain access to the internal functions of commercial applications like Word and Excel and of Windows itself. The approach is based on a technology called the Common Object Model, or COM, which lets a properly designed program share its data and its functional capabilities with other programs—any other programs, written in any other programming languages. If you've ever written macros for Word or Excel, you've worked with scripting and COM. One product of these efforts is Windows Script Host, or WSH, which provides a fast and easy way to write your own management and utility programs.

How WSH Works

The Windows Script Host program itself does almost nothing. Rather, all of the real work is done by other software components that WSH recruits to do your bidding, as illustrated in Figure 29.1. Windows Script Host doesn't even know how to interpret the programming language that your script is written in—it depends on a “scripting engine” to read and follow your instructions. And the real work of most scripts is done by objects, which are separate software components that represent real-world items—data, files, folders, networks, Windows user accounts, system services and so on. I'll talk more about objects shortly.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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