June 13, 2007

Got Something to Say? Display a Message of the Day

Use this HTA to communicate with users when they log on
RSS
View this exclusive article with VIP access -- click here to join |
See More Windows Script Host (WSH) Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

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. . . .


Already a VIP member?
Please log on to view the full article

Why become a VIP member?

VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine

Subscribe Now
Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events Group Policy Management Pitfalls: How to Avoid Them

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


SQL Server Magazine Office & SharePoint Pro DevProConnections asp.netPRO ITTV
IT Library Technology Resource Directory Connected Home Windows SuperSite
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc.     Terms of Use | Privacy Statement