I'm trying to run a process from the service as another user.
Process.Start(applicationPath, params, account, SecureStringPassword, "");
A service is running under the "Local System" account.
The account
parameter is a string like "WORKSTATION6\Tester". This user is a member of the Administrators group.
"Application Path" refers to Program Files, so every user can read from it.
But I have an "Access Denied" Exception every time I try to start the process. What can you advice?
Best Answer
There is an example of how to use Process.Start on the SecureString page. http://msdn.microsoft.com/en-us/library/system.security.securestring(v=VS.90).aspx#Y682
I think what you need to do is put the domain of your user account in the last parameter like this: