Chapter 10. Controlling the Flow of Execution


At this point, you should know enough VBScript to write some useful administrative scripts. In fact, the previous few chapters contained some great sample scripts that you should be able to put right to use, in addition to using them as reference examples.

What you lack at this point, and what I’ll cover in this chapter, is a way to make your scripts automatically respond to certain conditions, and execute different lines of script accordingly. For example, suppose you need to write a script that tells you which user has a particular file open on a file server. Your script must be able to iterate through all of the open resources ...

Get VBScript, WMI, and ADSI Unleashed: Using VBScript, WMI, and ADSI to Automate Windows® Administration now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.