Click here to Skip to main content
15,894,291 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,


Here i want to put Notify Icon Message in My Windows Service.But i tried as my best But the Notify Icon Message is not Fired when Windows Service as Stated.if any information related this please share with me.



Regards,

AnilKumar.D
Posted

That works in Windows XP. In Vista and 7 you cannot interact with the desktop directly because desktop process run in session 0 and services process in session 1. If you want to fire a notify icon you have to bypasss UAC when you start de Service like is explained here
 
Share this answer
 
Comments
Karthik Chintala 11-Mar-13 2:38am    
+5 Good answer and nice link to hook up
There is a a check box option in the service:

[ ] Allow service to interact with desktop.

If you really want the service process to show the icon this box will have to be checked.

Typically I noticed that application generally don't do that though.
They will have a service that run in the background using for example a loacalservice credentials and another app that run in the desktop using the current user credentials.
This is easier to handle with the various accounts that can be installed on the machine.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900