Newbie question - Service and NotifyIcon

J

Jim

I am a VB.Net newbie who has written a little test Windows Service which
puts a NotifyIcon in the system tray. I am finding that it works fine if I
start the Service manually whilst logged in on the server (icon appears). If
I allow the service to start automatically at boot time, the service starts
OK but I don't get the icon in the system tray when I log in. If I stop the
service and restart it whilst logged in, the icon appears.

Is this intended behaviour? Do I have to add some code to my Service to look
for newly-logged-in desktops to add the NotifyIcon to?

Any hints appreciated...

Regards

--Jim.
 
O

One Handed Man \( OHM - Terry Burns \)

In the services manager in Control Panel, you can modify the account to run
the service under. That account ( whatever it is ) does not have privilages
to add stuff to your desktop, whereas your account does. Either change this
to be your account if only you are going to use it, or put it in the
Administrartors group ( Local Administrators ).

I think this might do the trick, lets hope so.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing
 
J

Jim

Thanks for the response.

The service was set to run as LocalSystem. When I changed this to
Administrator, providing the correct password, the service would not start
up at all, throwing an exception at the point where NotifyIcon is created.

Now I'm really puzzled - I had assumed LocalSystem would have the necessary
rights to add icons to me desktop anyway.

Regards

--Jim.
 
O

One Handed Man \( OHM - Terry Burns \)

Not really sure then. LocalService should be able to do this. Maybe someone
else has an idea ?!?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top