Solved

How to Get a System Tray Balloon Message Box to Appear using VBScript

Posted on 2010-09-07
5
3,731 Views
Last Modified: 2013-12-20
How to Get a System Tray Balloon Message Box to Appear using VBScript? I have tried researching over the past day and I have found many websites that state that it is impossible for you to create a system tray balloon message such as "Installation Successful" for any sort of message. I am just tryign to create a simple message to start off with, as in the above example, and I cannot even figure that out. Any help would be greatly appreciated. Unfortunately, I have no sample code to work with for this example.
0
Comment
Question by:thenthorn1010
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:crawfordits
ID: 33621633
I don't believe you can do it with VBS.  You could do it in VB.  You could also use AutoIT to do it.  http://www.autoitscript.com/autoit3/index.shtml
0
 

Author Comment

by:thenthorn1010
ID: 33621663
This solution must be deployed onto thousands of PCs. Would the installation of this AutoIT or using VB be possible to have on all of the PCs?
0
 
LVL 29

Expert Comment

by:matrixnz
ID: 33625990
Yes, AutoIT basically uses Windows API  the code below would (from AutoIT Help) would show two different types of Tray Tips.

Cheers
TrayTip("I'm a title", "I'm the message", 5, 1)
MsgBox(4096,"", "Press OK to see another tip.")
TrayTip("clears any tray tip","",0)
TrayTip("", "A different tray tip.", 5)
Sleep(5000)

Open in new window

0
 

Author Comment

by:thenthorn1010
ID: 33626729
That looks like the correct solution, but one final constraint to my problem is having all of the PCs having the same DLLs and other libraries. Would AutoIT need to be installed on all PCs on the domain/networks before pushing out a message similar to this on a couple of thousand PCs? (The message will be for an installation program, but this is just a simple example of what I was attempting to do.)
0
 
LVL 29

Accepted Solution

by:
matrixnz earned 500 total points
ID: 33626877
Basically once you compile AutoIT Script it becomes an exe file, however what you would do is use AutoIT as a software wrapper, so basically you would use something like the code below, basically it runs the executable file silently it then sleeps while the process is running, once the program finishes it will display the Tray Tip.  This is a very basic method, you can of course use a progress bar or create a GUI of your own to be displayed while the installer is running.  For MSI you would use: Run('MSIExec.exe /i ' & @ScriptDir & '\Setup.msi /QB', '', @SW_HIDE)

I wrap 99% of my programs with AutoIT, the reason being is that I can check to see if a process exists and ask the user to close it, you can also write alot of conditions for example if fileexists or regread to determine how your setup will run, for example I normally check to see if an application is already installed by reading the registry, if true rather than re-running the install I'll run a repair i.e. Msiexec.exe /focums <path to msi> ...

Cheers


$MYEXE = Run(@ScriptDir & '\Setup.exe /S', '', @SW_HIDE)
While ProcessExists($MYEXE)
  Sleep(500)
Wend

TrayTip('Application Name', 'Completed', 5, 1)

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question