I want to run a PSExec
action, that need admin right, from a C#
app launch from user space. Of course, the complication, that's I don't want the UAC.
I want to run an action like this:
PsExec.exe -i -s powershell.exe -command "whoami *> 'out.txt'"
- If I run example in cmd/powershell with admin right, it's work.
- If I run example in C# exe with process with
verb = "runas"
, it's working - If I run example in C# exe with process with user/password/domain, it's not working
I've tried a lot of other things, but I've not find a good trick. (powershell with credential, run a .bat or .ps1, ...)
I'm open to every solution and/or if it's really doable.