[newbie] windows services

G

Guest

Hi,

I'm currently developing a .net windows service, but still I've got some
questions I couldn't find an answer to:

- When will the service be started? When the computer is started - or when a
user logs in?
- If the service is started when the computer itself is started: What would
a call to My.User result? what would be the local username?
- How does all this react on remote login?

Thanks for any help and hints,

Peter
 
B

Bob Milton

Peter,
Windows services start when the OS starts (or there abouts), before
anyone logs in. So there is no user (though you may get the account that the
service starts under when asking for user - that account is usually
localsystem). Note that as a result there are things which may not be there
when your service starts (like mapped connections to other computers, which
are tied to a login user).
Bob
 

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