C# Console App - Run a Process as Local Admin and Network User (Windows)

183 Views Asked by At

I'm trying to figure out a way of running Process.Start with 2 lots of credentials if at all possible?

I need to run cscript.exe with a load of arguments from Process.Start within a C# console app that A, needs to be run as the Local Administrator and B, needs access to a network share to pull a wsf script file for cscript to work with.

Process.Start seems to only accept one lot of credentials so I can only satisfy one or the other conditions...

Any ideas how I could possibly execute the process as the local admin but also wrap the entire thing in a network access session using credentials?

Thanks!

0

There are 0 best solutions below