Interactive CMD Prompt Character Length

Trying to run a remote java command on a device and the remote interactive command prompt cuts off the command. Is there anyway to increase the character input? It runs fine from a regular command prompt.

Hi there,

When you have a second, can you share the command you’re having trouble with as a .txt file?

Best,

Branden

‘“C:\Program Files (x86)\Arctic Wolf Networks\Agent\scans\jre\11.0.16\bin\java.exe” -Xmx6144m -Djoval.shellcommandAdapter.enable=true -Djoval.diagnostics.maxCount=2000 -Dlicense.file=“C:\Program Files (x86)\Arctic Wolf Networks\Agent\scans\scan-utility\rootsecure.com.sig.xml” -jar “C:\Program Files (x86)\Arctic Wolf Networks\Agent\scans\scan-utility\Scan-Utilities.jar” scan -c “C:\Program Files (x86)\Arctic Wolf Networks\Agent\scans\oval_copy.ini”’ | cmd.exe

Thank you. I was able to recreate the behavior in my environment. This may be a bug with PsExec, a tool we leverage for interactive prompt but don’t own or manage. Can you test if you’re able to successfully launch an Interactive PowerShell session and execute the script?

I can run the commandline via psexec by itself so something in Right-Click tools is limiting the amount of characters allowed. Powershell does not cut the command off.

Right Click Tools starts a psexec session which is different than using psexec to run a single command. If you manually start a psexec session outside of Right Click Tools using the syntax “psexec \\remotecomputer cmd” are you able to paste the full command or does it get cut off?

Yes it is only cutoff in the Right-Click tools Interactive Command Prompt.

Did you start a remote psexec session first and then attempt to paste the script after? I’m able to recreate the behavior you’re reporting by starting a psexec session manually, without using Right Click Tools, and attempting to paste the same string after in the psexec session.

Just confirmed the same behavior on my test environment so it is Psexec having this issue. Thanks Brandon

Thank you for confirming. No problem.

This does work also. So the issue is calling a command prompt from within Psexec.

C:\pstools>PsExec64.exe \desktop1 “C:\Program Files (x86)\Arctic Wolf Networks\Agent\scans\jre\11.0.16\bin\java.exe” -Xmx6144m -Djoval.shellcommandAdapter.enable=true -Djoval.diagnostics.maxCount=2000 -Dlicense.file=“C:\Program Files (x86)\Arctic Wolf Networks\Agent\scans\scan-utility\rootsecure.com.sig.xml” -jar “C:\Program Files (x86)\Arctic Wolf Networks\Agent\scans\scan-utility\Scan-Utilities.jar” scan -c “C:\Program Files (x86)\Arctic Wolf Networks\Agent\scans\oval_copy.ini”

1 Like