user2542069
user2542069

Reputation: 31

Is it possible to create a service or application which can programmatically logon a user in windows

Is it possible to create a service or application which can programmatically logon a user in when windows server(2003 and 2008) starts up. if possible how to write a program in c#, And how to hook the windows.

Upvotes: 3

Views: 196

Answers (1)

tker
tker

Reputation: 266

If you create a Windows Service project you may create a ProjectInstaller containing a ServiceInstaller object, one property of which is whether the service is to start automatically whenever the system starts. You may also specify which account you wish it to run under, including the username and password, as properties of the ProjectInstaller's ServiceProcessInstaller object.

For a tutorial on how to create such a service have a look at this.

A Windows Service may not, however, have a UI (you mention wanting to "hook the windows"?) unless you associate a NotifyIcon with the service that the user clicks on to bring up a window.

Upvotes: 3

Related Questions