Solved

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

Posted on 2010-09-07
5
3,596 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now