Click here to Skip to main content
13,002,133 members (80,265 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am using psexec to run a exe in a remote machine which is windows 7. I need the exe to run with administrator privilege as it needs to update some registries under HKLM in the remote system.

While running psexec I am providing the credentials of an administrator account on the remote system. All is working well when UAC on the remote system is turned off.

But when UAC is turned on , the remote exe fails to start.

I have configured the exe to use manifest setting of "RequireAdministrator". What I expect is to see a UAC prompt warning of elevation when the exe is launched on the remote machine. Though it would be great if there is some way to bypass the prompt.

But unfortunately, the exe fails to launch itself. Any ideas?
Posted 24-May-13 3:19am
Updated 24-May-13 3:37am

1 solution

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

Solution 1

It is the -h switch of psexec.exe which is needed. The switch is undocumented in the msdn page but you can get it in the the help (/?) of the tool. Thanks.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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