When I run it with Store Standard Out checked I see all of the diagnostic output except for what psexec should have produced. It does the actual psexec call as I'm seeing the first line "Windows IP Configuration" but then it cuts off and there are 15 lines more that should be appearing. (This is a test script - the actual script is a longer reg query.)
Here is the stdout
Arguments to subprocess: ['D:\\users\\ellen\\Scripts\\psexec.exe', '-u', 'frodo\\administrator', '-p', '******', '\\\\frodo', 'C:\\windows\\syswow64\\ipconfig.exe']
Ipconfig:
Output Tupple:
('\r\nWindows IP Configuration\r\n\r\n', None)
When I uncheck Store Standard Output then there is "No Output"
Python Script (backslashes are escaped)
This works on the cmd line
ipconfig is just a test command, the actual command is a complicated reg query.
psexecloc = "D:\\users\\ellen\\Scripts\\psexec.exe"
remotecmd = "C:\\windows\\syswow64\\ipconfig.exe"
username = "frodo\\administrator"
password = "*****"
remotehostname = "\\\\frodo"
args = [ psexecloc, "-u", username, "-p", password, remotehostname, remotecmd ]
print "Arguments to subprocess: ", args
print
print "Ipconfig: "
output = subprocess.Popen(args, shell=False, stdout=subprocess.PIPE)
outstr=output.communicate()
stdoutstr = outstr[0]
stderrstr = outstr[1]
print "Output Tupple: "
print outstr