#include <Constants.au3>
$A = 'cmd /c net view \\127.0.0.1| findstr "Disk"'
$RunA = Run($A, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
ProcessWaitClose($RunA)
$TextA = StdoutRead($RunA)
$B = 'cmd /c for /f "delims= " %i in ('&'"'&$TextA&'"'&') do echo %i'
$RunB = Run($B, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
ProcessWaitClose($RunB)
$TextB = StdoutRead($RunB)
MsgBox(0, "STDOUT read:",$TextB)
=======================================
该段代码为何获取的值为空白呢?
$TextA使用msgbox显示获取的值是正确的,而且$B使用msgbox显示的命令复制到CMD里面也能获取到正确的值,可是运行到$TextB值就是空白!
求指教啊!!! |