poweradminllc / PAExec

Remote execution, like PsExec
523 stars 177 forks source link

Redirect process output to caller's stdout/stderr #2

Closed fjakop closed 3 years ago

fjakop commented 9 years ago

I'm not a C programmer and really like the program. I wonder if it would be possible to redirect the output of the started process to the stdout or stderr of the caller, so it would read like

PAExec v1.25 - Execute Programs Remotely Copyright (c) 2012-2013 Power Admin LLC www.poweradmin.com/PAExec

PAExec starting process ["foo.cmd"] as current user Launch (launchGLE=1300) params: path=["foo.cmd"] user=[{non-null}], pEnv=[{env}], dir=[{null}], stdin=[x0], stdout=[x0], stderr=[x0]

--- started process output start bla bla bla ... --- started process output end

PAExec returning exit code 0

jheliker commented 9 years ago

Just a "bump" this would be a valuable option for my use-cases too.

transistor1 commented 9 years ago

Pretty sure it does this already - in an admin console, try

C:\>paexec -s "c:\Windows\System32\cmd.exe"

...
C:\Windows\System32>whoami
nt authority\system

C:\Windows\System32>
poweradminllc commented 3 years ago

As @transistor1 shows above, it already does what is requested.