Tray Icon for multiple users

S

Steve

Hello--

I have made a C# executable that monitors the server it is placed on.
This works great so far.

Since I don't have physical access to this machine, I have my
executable launched by task manager and it runs in the background. Its
owner is SYSTEM, so that when I log out of terminal services, the
application is still running.

My question is how do I show this app to all users who terminal service
in? I can see the .exe in task manager, but I can't get the GUI to
appear. The app resides in the system tray until you click on it, and
then a form appears. Right now, I can't get the tray icon to appear
under different logged in users.

I have the app set so only one instance can be executed at one time.
Any ideas? I'd prefer to not turn this into a service (though basically
that's what it is).

How can I get a process (executable) to appear visually to all users
who log onto the server via terminal services?

Thanks -
 
N

Nicholas Paldino [.NET/C# MVP]

Steve,

Doing this is a REALLY bad idea. This should be a service, and it
should have no access to the desktop of whomever logs in.

Rather, you should have applications that connect to the service
(through remoting, basically, or some other interprocess communication)
which will send/receive data or make calls as necessary. Then, you can
force this app to run at startup when a user logs in.

Hope this helps.
 
S

Steve

Hi Nicholas --

Thanks for answering. Why is this a really bad idea?

Basically I'd like a GUI into this "service". This app simply monitors
the event logs, and sends notifications out when something in the event
log is written.

So you're saying I should split this application in two... have a
"service" run that monitors the event log, and then split the GUI part
out to interface with the service?

I was thinking more along the lines of how the virus scanners work...
it runs as a service, but you also have a GUI for each and every user
that logs in.

Thanks for the response!
Steve

Steve,

Doing this is a REALLY bad idea. This should be a service, and it
should have no access to the desktop of whomever logs in.

Rather, you should have applications that connect to the service
(through remoting, basically, or some other interprocess communication)
which will send/receive data or make calls as necessary. Then, you can
force this app to run at startup when a user logs in.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Steve said:
Hello--

I have made a C# executable that monitors the server it is placed on.
This works great so far.

Since I don't have physical access to this machine, I have my
executable launched by task manager and it runs in the background. Its
owner is SYSTEM, so that when I log out of terminal services, the
application is still running.

My question is how do I show this app to all users who terminal service
in? I can see the .exe in task manager, but I can't get the GUI to
appear. The app resides in the system tray until you click on it, and
then a form appears. Right now, I can't get the tray icon to appear
under different logged in users.

I have the app set so only one instance can be executed at one time.
Any ideas? I'd prefer to not turn this into a service (though basically
that's what it is).

How can I get a process (executable) to appear visually to all users
who log onto the server via terminal services?

Thanks -
 
N

Nicholas Paldino [.NET/C# MVP]

Steve,

How the virus scanners work (a gui that connects to the service) is
exactly the way I have outlined it. Basically, there is interprocess
communication which the GUI uses to communicate with the service, which is
always running. You don't want a service to depend on a desktop because it
is not guaranteed that you always have an interactive user session to
interact with.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Steve said:
Hi Nicholas --

Thanks for answering. Why is this a really bad idea?

Basically I'd like a GUI into this "service". This app simply monitors
the event logs, and sends notifications out when something in the event
log is written.

So you're saying I should split this application in two... have a
"service" run that monitors the event log, and then split the GUI part
out to interface with the service?

I was thinking more along the lines of how the virus scanners work...
it runs as a service, but you also have a GUI for each and every user
that logs in.

Thanks for the response!
Steve

Steve,

Doing this is a REALLY bad idea. This should be a service, and it
should have no access to the desktop of whomever logs in.

Rather, you should have applications that connect to the service
(through remoting, basically, or some other interprocess communication)
which will send/receive data or make calls as necessary. Then, you can
force this app to run at startup when a user logs in.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Steve said:
Hello--

I have made a C# executable that monitors the server it is placed on.
This works great so far.

Since I don't have physical access to this machine, I have my
executable launched by task manager and it runs in the background. Its
owner is SYSTEM, so that when I log out of terminal services, the
application is still running.

My question is how do I show this app to all users who terminal service
in? I can see the .exe in task manager, but I can't get the GUI to
appear. The app resides in the system tray until you click on it, and
then a form appears. Right now, I can't get the tray icon to appear
under different logged in users.

I have the app set so only one instance can be executed at one time.
Any ideas? I'd prefer to not turn this into a service (though basically
that's what it is).

How can I get a process (executable) to appear visually to all users
who log onto the server via terminal services?

Thanks -
 

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

Top