Click here to Skip to main content
14,392,596 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi,

I wrote some c# code that uses PSexe.
I want it to run a remote exe on a machine connected to my LAN.

That exe creates a new local user.
When I run that exe locally on the remote machine (after right click --> "run as Admin") - it works fine.
I don't know how to simulate the right click --> "run as Admin" from Psexec.
I have tried the -l flag but it didn't work

any ideas?
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Try changing the property of the executable to always run as admin.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100