Displaying More Detailed Information to the User

You saw earlier that the WScript object’s Echo method is useful for displaying simple text messages to the user. You can gain more control over the displayed message by using the WshShell object’s Popup method. WshShell refers to the Shell object that is exposed via the Automation interface of WScript. So before you can run the Popup method, you need to use CreateObject to create an instance of the WshShell object:

Set objWshShell = WScript.CreateObject("WScript.Shell")

If you’re familiar with Microsoft Visual Basic, the Popup method is similar to the MsgBox function in that it enables you to control both the dialog box title and the buttons that are displayed, as well as to determine which of those ...

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

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