Starting a process with credentials from a Windows Service

后端 未结 8 1492
情话喂你
情话喂你 2020-11-27 05:42

I have a Windows service that runs as mydomain\\userA. I want to be able to run arbitrary .exes from the service. Normally, I use Process.Start() and it works fine, but in s

8条回答
  •  有刺的猬
    2020-11-27 06:13

    How are you setting the domain, user, and password? Are you setting the domain properly as well as the password (it must use a SecureString).

    Also, are you setting the WorkingDirectory property? When using a UserName and Password, the documentation states that you must set the WorkingDirectory property.

提交回复
热议问题