How to add application to notification area via VBscript?

Software Development

I am developing a software to maintain the database of a fitness centre and I have almost completed it. Since there are many centers all over our town, the software would be distributed among various centers. The software will have feature to send internal messages. Now to show the user that message has been received, there will be a notification that will be popping up in the quick launch bar. I am having difficulty making the notification pop-up in the quick launch bar in Windows 7. Can someone tell me how to get the active notification in the software when it is minimized and is in the quick launch bar?

The primary reason of software getting notification on the quick launch bar is because of the following registry key,
HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify.
The problem is that all the data that is stored in this registry key is in the binary form. In this Registry Key, in the ending part of TrayNotify, if you put ‘PastIconsStream’, you will find the information where the icons and logos are stored. Another registry key is ‘IconStreams’, it stores the program path, caption and tip for the designated software. You will need to have good knowledge of binary code to use this registry key.

The method that 'Shreevats' has told in his post is good, but I don’t think that it is practical. Since you are making this software for your client, it is obvious that the client will be using different computer. The registry key of his computer might be different than yours. Also the built of his hardware and operating system might be very different than yours. So if you edit the registry key for the notification of the software in your computer, there are less chances of the same registry key being presented in your client’s computer. If you are going to edit the registry key, then you will need to use some method which will match the registry key of your client’s computer with registry key of your computer.

I have found a way to generate the notification for the software that is developed using Visual Basic. I used two different files to achieve it, one is a .bat file and other one is the.ps1 file. In the .ps1 file, I inserted following code which I have posted below:

[Note that I have made this code according to my need, you can edit according to your need and computer’s built.]

Now you will have to make a .bat file which will run the .ps1 file that you have just made. Now the software will have various forms, that is when notification will be shown, when not and so on. I have designed three types of conditions for it. Here they are:

Quote:

0 = should only show the notifications
1 = no notification and icon must be shown
2 = icon as well as notification must be shown

You can now set the icon for the software and notification in the quick launch area. You will have to deal with the IP address and system name by yourself. To play with the bat file and the ps1 file to generate the notification, you will also have to involve the explorer.exe to get things done. Now that we know what we have to do, here is how you will make the .bat file. This is how the .bat file I made looks like:

This will launch the code for .ps1 file that I have given and you can then pass any two parameter that I have suggested. This is the only way that I have found which is possible to achieve the notification. You will need to place the .bat file and the ps1 file in the same folder to make them work properly.

I tried the above method and I think that it is a good way. The only problem I found is that every time a notification has to be generated, the .bat is launched. The.bat file actually kills the explorer.exe ad then again starts it. Though the whole method is safe, it is not good from old computers or computers with slow working. In such machines, if multiple notifications arrive at a time, it will get overloaded with request to kill explorer.exe and re-incarnate it again. This will certainly crash he computer.