Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PsExec gets stuck on licence prompt when running non-interactively

I have a Hudson build script which calls the SysInternals PsExec utility. Normally, when PsExec is run for the first time by a given user it pops up a dialog box asking the user to accept the licence. The build agent runs as a service and I can see that the build gets stuck at PsExec. Process Explorer shows that PsExec is running, so I strongly suspect it's displaying that same prompt, but because it's running non-interactively there is no way to accept the prompt. Is there any way to get around this silly limitation? Running on Windows Server 2008 R2 x64.

like image 540
EMP Avatar asked Mar 01 '11 05:03

EMP


People also ask

How do I accept PsExec EULA?

Use the /accepteula command-line switch to accept the licence agreement. Caution: if the reg key above is set to 0 (EULA was declined once) then the /accepteula will not work, you have to set the key to 1 manually (or delete it altogether). Great, thank you! /accepteula does the trick.

How do I exit PsExec?

To exit from the command prompt, type exit . PsExec will stop the cmd process on the remote computer and return focus to the local computer. Do NOT use Ctrl-C to close out of an interactive cmd session. Always use exit .

How do I run a PsExec as another user?

To run an interactive remote command prompt as a different user, run the following command. The introduction of the -u switch for the user and the -p password switch allows us to execute as a different user. Normally PSExec will run with the credentials of the local user that has run the command.


1 Answers

Use the /accepteula command-line switch to accept the licence agreement.

Or set

HKCU\Software\Sysinternals\PsExec\EulaAccepted  

to 1

Caution: if the reg key above is set to 0 (EULA was declined once) then the /accepteula will not work, you have to set the key to 1 manually (or delete it altogether).

like image 144
Alain Pannetier Avatar answered Sep 21 '22 23:09

Alain Pannetier