Jeremy Stein - Brain

« »

LANDesk VBS script display message window in front

If you have a VBS script running a WScript.echo command to display a message to the user, the message may just blink in the task bar and go unnoticed by the user. To ensure that the message comes into focus, you can try this nasty approach of temporarily minimizing all other windows:

Dim Shl :Set Shl = CreateObject("Shell.Application")
WScript.Echo "Important: you should do X."

Update: I’ve learned that a better way to solve this problem is just to use MsgBox with the vbSystemModal parameter:

MsgBox "Important: you should do X.", vbSystemModal

May 7, 2012 No Comments.

No Comments

Be the first to comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

Why ask?

« »