Ok, I have a simple thing that is driving me crazy. I have to automate a command line based application.
I use a call like:
$pid = Run(@Comspec,"c:\MyAppPath\",@SW_SHOW)
This will launch the command window and all is well except I cannot capture stderr
So... I add that in like so:
$pid = Run(@Comspec,"c:\MyAppPath\",@SW_SHOW,$STDOUT_CHILD)
Now the window flashes up then disappears and I cannot capture the stdout correctly. Why is the window going away when I add the call to $STDOUT_CHILD?
I use a call like:
$pid = Run(@Comspec,"c:\MyAppPath\",@SW_SHOW)
This will launch the command window and all is well except I cannot capture stderr
So... I add that in like so:
$pid = Run(@Comspec,"c:\MyAppPath\",@SW_SHOW,$STDOUT_CHILD)
Now the window flashes up then disappears and I cannot capture the stdout correctly. Why is the window going away when I add the call to $STDOUT_CHILD?