469,903 Members | 1,579 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

A Windows Service and the Desktop

I have a windows service that does some stuff. It runs a couple of
batch files. After the successful execution of a batch file I need to
display some sort of notification to the end user that the job did
infact complete successfully.(Note: Once the jobs are completed the
service simply keeps checking a folder on the network for more files
to process, if it doesnt find them it just sits and does nothing. It
checks every minute and works quite well)

I am hitting a dead end in every direction in terms of notification.

Is there anyway a service can display any sort of notification to the
user's desktop? I know I could convert the service to an actual
application and just run it from the system tray but I want to make
sure there is no other way before I do that.

Thanks.
Nov 15 '05 #1
2 1741
Blaz,

You could have your service interact with the destkop. However, this is
generally a bad idea.

An alternative to what you are doing is have your service wait for
notifications from another application (through remoting most likely) to do
its work.

However, given that the service would do nothing but wait for a
notification from one other app to do its work, there is no point in making
it a service, if all it is going to service is your app. You are probably
better of making it a tray application.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Blaz" <co************@yahoo.com> wrote in message
news:23**************************@posting.google.c om...
I have a windows service that does some stuff. It runs a couple of
batch files. After the successful execution of a batch file I need to
display some sort of notification to the end user that the job did
infact complete successfully.(Note: Once the jobs are completed the
service simply keeps checking a folder on the network for more files
to process, if it doesnt find them it just sits and does nothing. It
checks every minute and works quite well)

I am hitting a dead end in every direction in terms of notification.

Is there anyway a service can display any sort of notification to the
user's desktop? I know I could convert the service to an actual
application and just run it from the system tray but I want to make
sure there is no other way before I do that.

Thanks.

Nov 15 '05 #2
Gav
Another way to look at it is.... does it really have to notify the user in
this way. Could it not write its transactions to a log file and have a
seperate windows application that the end user can run to look at the log
file to see whats going on. Without knowing exactly what the service is
doing, if there are alot of files going in the directory the user would be
getting a popup message every minute (which could be annoying).

It may be way off what your looking for but its only a thought thats all.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...
Blaz,

You could have your service interact with the destkop. However, this is generally a bad idea.

An alternative to what you are doing is have your service wait for
notifications from another application (through remoting most likely) to do its work.

However, given that the service would do nothing but wait for a
notification from one other app to do its work, there is no point in making it a service, if all it is going to service is your app. You are probably
better of making it a tray application.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Blaz" <co************@yahoo.com> wrote in message
news:23**************************@posting.google.c om...
I have a windows service that does some stuff. It runs a couple of
batch files. After the successful execution of a batch file I need to
display some sort of notification to the end user that the job did
infact complete successfully.(Note: Once the jobs are completed the
service simply keeps checking a folder on the network for more files
to process, if it doesnt find them it just sits and does nothing. It
checks every minute and works quite well)

I am hitting a dead end in every direction in terms of notification.

Is there anyway a service can display any sort of notification to the
user's desktop? I know I could convert the service to an actual
application and just run it from the system tray but I want to make
sure there is no other way before I do that.

Thanks.


Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Andrew | last post: by
3 posts views Thread by Lubomir | last post: by
7 posts views Thread by Ahmed Perlom | last post: by
2 posts views Thread by =?Utf-8?B?Sm9obiBG?= | last post: by
9 posts views Thread by dm3281 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.