Jump to content

Recommended Posts

Posted

Hi,

Would anyone know why the output to StdOutRead doesn't match what I'm getting in the 'Run' command I'm using before it ?

Simple app:

#include <Constants.au3>
$sendCMD='echo hello'

Local $iPID = Run(@ComSpec & " /k " & $sendCMD)

Local $iPID = Run(@ComSpec & " /k " & $sendCMD, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
ProcessWaitClose($iPID)
$Message = StdoutRead($iPID)
MsgBox(0, "Stdout Read:", $Message)

Specifically the run command is opening up my X drive as shown but the same command piped to stdout is showing the C:\WINDOWS\SysWOW64.

 

 

Thanks 🙂

StdOutRead.png

Posted

I need some smelling salt.  Simple answer.

I forgot to add the 2nd parameter on the 1st command.

Local $iPID = Run(@ComSpec & " /k " & $sendCMD,@SystemDir)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...