Home All Groups Group Topic Archive Search About

About Windows Services

Author
8 Jun 2006 11:35 AM
Water Cooler v2
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?

Author
8 Jun 2006 11:53 AM
Michael Nemtsev
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/microsoft.public.dotnet.general/browse_frm/thread/be1f927b5b960c4b/6fb8559c0936aa07
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
Author
8 Jun 2006 12:23 PM
Water Cooler v2
> 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?
Author
8 Jun 2006 12:30 PM
Olof Lagerkvist
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
Author
8 Jun 2006 2:48 PM
Claes Bergefall
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

Show quote
"Water Cooler v2" <wtr_***@yahoo.com> wrote in message
news:1149766504.998062.310830@f6g2000cwb.googlegroups.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?

AddThis Social Bookmark Button