Local system account with Process class and with a Windows Service?

  • Thread starter =?ISO-8859-1?Q?=22Andr=E9s_G=2E_Aragoneses=22?=
  • Start date
?

=?ISO-8859-1?Q?=22Andr=E9s_G=2E_Aragoneses=22?=

Hello.

I have a Windows Service which I want to execute a file. The service is
running under the local system account but when the file is executed it
seems to be run with the profile of the user Administrator (I am using
the System.Diagnostics.Process class). How can I force the execution to
the local system account too?

Do I have to use the string "SYSTEM" for the StartInfo.UserName member?
If yes, what password should I use?

Thanks in advance.

Andrew

--
 
W

Willy Denoyette [MVP]

A process spawn by a service, running as 'localsystem' also runs as
'localsystem' and it uses the same profile, which is the "default profile".
How did come to the conclusion that the process is using the Administrators
profile?
Note that you can't specify SYSTEM as user account, this account is a
'pseudo account', the name is not SYSTEM nor does does it have a password.

Willy.

| Hello.
|
| I have a Windows Service which I want to execute a file. The service is
| running under the local system account but when the file is executed it
| seems to be run with the profile of the user Administrator (I am using
| the System.Diagnostics.Process class). How can I force the execution to
| the local system account too?
|
| Do I have to use the string "SYSTEM" for the StartInfo.UserName member?
| If yes, what password should I use?
|
| Thanks in advance.
|
| Andrew
|
| --
 

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