[已解决]'slmgr.vbs -dlv'怎么回显信息
本帖最后由 MacroStudio 于 2012-5-2 10:52 编辑#include <Constants.au3>
Local $foo,$text
$foo = Run(@ComSpec & " /c slmgr.vbs -dlv", "", @SW_HIDE, $STDOUT_CHILD)
ProcessWaitClose($foo)
$text=StdoutRead($foo)
MsgBox(0, "STDOUT read:", $text)这个没有用啊,求解~ 本帖最后由 netegg 于 2012-5-2 10:47 编辑
#RequireAdmin
$STDOUT = ''
FileCopy(@SystemDir & '\slmgr.vbs', @TempDir) ; Copy to temp --> No MUI
$PID = Run(@ComSpec & ' /c @echo off && for /f "tokens=* skip=4" %i in ' _
& "('cscript " & '"%Temp%\slmgr.vbs"' & " -dlv')" _
& "do echo %i", '', @SW_HIDE , 2) ;$STDOUT_CHILD
While 1
$STDOUT &= StdoutRead($PID)
If @error Then ExitLoop
WEnd
MsgBox(0,0,$STDOUT) 回复 2# netegg
谢谢蛋蛋{:face (411):}
页:
[1]