470,870 Members | 1,398 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

About Windows Services

I want to run a service at the background but also provide some user
interface for editing some configuration options. In this regard, my
questions are:

1. Can a Windows Service have a UI along with it?
2. Can I associate a NotifyIcon (systray icon) with a Web service?
3. Can a Windows service be such that it runs only on a particular
Windows account on the domain? I mean can it use Windows Authentication
to see if it must start up on a particular login or not?

Jun 8 '06 #1
4 1035
my replies below
I want to run a service at the background but also provide some user
interface for editing some configuration options. In this regard, my
questions are:
1. Can a Windows Service have a UI along with it?
No in general, service is not appropriate for UI, besides it breaks security
design.
Willy has more to say about this, it's his area, see there for example
http://groups.google.com/group/micro...b8559c0936aa07
You can create UI and service separately and communicate between them
2. Can I associate a NotifyIcon (systray icon) with a Web service?
You app shold have any visual form to became systray icon. If you wrote a UI
wrapper for WS then you can minimize it to tray
3. Can a Windows service be such that it runs only on a particular
Windows account on the domain? I mean can it use Windows Authentication
to see if it must start up on a particular login or not?


In the property of service you can specify under with account it should start

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Jun 8 '06 #2
> 2. Can I associate a NotifyIcon (systray icon) with a Web service?
Sorry. That was a typo. The second question is:

2. Can I associate a NotifyIcon (systray icon) with a Windows service?

Jun 8 '06 #3
Water Cooler v2 wrote:
I want to run a service at the background but also provide some user
interface for editing some configuration options. In this regard, my
questions are:


[...]

Generally the best solution is to create the service without UI parts
and instead create a separate application to run in the users logon
sessions and some kind of IPC mechanism (e.g. pipes or sockets) between
the UI and the service.

This way you can support multiple logon sessions, such as Fast User
Switching in XP, Terminal Services and Remote Desktop for Administration
on Windows Servers and the new logon sessions on Vista. If you choose to
create the UI directly in an interactive service it can only interact
with the console session, session 0, and this session is not visible on
Vista.

--
Olof Lagerkvist
ICQ: 724451
Web: http://here.is/olof

Jun 8 '06 #4
Others have given you answers to your questions, but I'm just wondering if a
service is really what you want. Your questions seems to indicate that you
want something that starts automatically when someone logs on (with a
systray icon, UI etc). If so, a service is not what you're looking for. Use
a normal application instead and put a setting in the registry to start it
automatically when someone logs on.

/claes

"Water Cooler v2" <wt*****@yahoo.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
I want to run a service at the background but also provide some user
interface for editing some configuration options. In this regard, my
questions are:

1. Can a Windows Service have a UI along with it?
2. Can I associate a NotifyIcon (systray icon) with a Web service?
3. Can a Windows service be such that it runs only on a particular
Windows account on the domain? I mean can it use Windows Authentication
to see if it must start up on a particular login or not?

Jun 8 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Bill Sonia | last post: by
8 posts views Thread by Bill Sonia | last post: by
2 posts views Thread by =?Utf-8?B?dmlzaHJ1dGg=?= | last post: by
1 post views Thread by =?Utf-8?B?dmlzaHJ1dGg=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.