poweradminllc / PAExec

Remote execution, like PsExec
523 stars 177 forks source link

Add support for short paths #34

Closed icnocop closed 4 years ago

icnocop commented 4 years ago

I'd like to request support for short paths.

For example, paexec.exe -u Username -p Password /C "C:\DOCUME~1\Username\LOCALS~1\Temp\test.cmd >C:\DOCUME~1\Username\LOCALS~1\Temp\test.txt 2>&1"

Currently, paexec.exe returns: One or more source files were not found.

That command works with psexec.exe without issues.

Otherwise, how can I execute the command with spaces and redirect stdout and stderr to a file?

Thank you.

icnocop commented 4 years ago

Sorry, this was my fault.

The following command works without issue: paexec.exe -u Username -p Password cmd.exe /C "C:\DOCUME~1\Username\LOCALS~1\Temp\test.cmd >C:\DOCUME~1\Username\LOCALS~1\Temp\test.txt 2>&1"

I was missing cmd.exe.

Funny that psexec.exe doesn't produce an error if it isn't there.