A community member has associated this post with a similar question:
Create a process that runs as a different user from a windows service

Only moderators can edit this content.

How to start a process using different credentials from a windows service

WhatsaMattaU 0 Reputation points
2024-04-30T12:40:34.1066667+00:00

Hi,

How can I start a process from C# using different credentials from a windows service running in a virtual service account?

I have tried providing credentials to ProcessStartInfo without success. The process launches but still runs in the service account.

Various posts on line mention duplicating a process token, but I either end up with an access denied or insufficient privileges exception.

Alternatively, is there any way to grant the virtual service account the permissions needed to create a remote PowerShell session on a Windows 10 IoT Core device?

Thank you.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,438 questions
0 comments No comments
{count} votes