Alternatives to Msgbox in VBScript

halfbit picture halfbit · Apr 24, 2012 · Viewed 7.8k times · Source

I want to show status information after a VBS based login script runs. I could simply use a Messagebox, but would rather have this information appear above the clock briefly after the user logs in.

What alternatives do I have instead of a Messagebox?

Answer

Nilpo picture Nilpo · Apr 24, 2012

What you are referring to is something like a balloon tip. There is nothing like this available in VBScript natively. You would need to use a third-party component.

As an aside, PowerShell IS able to do this.

[reflection.assembly]::loadwithpartialname("System.Windows.Forms")
[reflection.assembly]::loadwithpartialname("System.Drawing")
$notify = new-object system.windows.forms.notifyicon
$notify.icon = [System.Drawing.SystemIcons]::Information
$notify.visible = $true
$notify.showballoontip(10,"Reboot Required","Please restart your computer",[system.windows.forms.tooltipicon]::None)