On Linux or Unix systems, you can use the motd command to display a "message of the day" file that appears when users log on to their systems. In Windows, displaying a message from a logon script is typically the only way to guarantee users are going to see the message. (Whether users will actually read the message is a different matter.)
There are many ways to display a message to users from a logon script. If you're using a shell script or a console-based Windows Script Host (WSH) script, you can output text to the console window, although doing so isn't the best way to attract attention to a message. If you're running a WSH script with the WScript host, the WScript.Echo method displays the message in a message box with the title "Windows Script Host" and an OK button. However, the title, icon, and buttons aren't customizable. You can also use the WshShell object's Popup method, which lets you customize the title, icon, and buttons and includes a timeout feature that automatically dismisses the dialog box after a specified amount of time. Although the Popup method is useful, you can't specify a font, change the color scheme, or add a scroll bar for longer messages. . . .


Cheers,
Jeremy.
jeremyts December 28, 2007 (Article Rating: