找回密码
 加入
搜索
查看: 1758|回复: 2

[AU3基础] [已解决]'slmgr.vbs -dlv'怎么回显信息

[复制链接]
发表于 2012-5-2 10:16:48 | 显示全部楼层 |阅读模式
本帖最后由 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)
这个没有用啊,求解~
发表于 2012-5-2 10:26:48 | 显示全部楼层
本帖最后由 netegg 于 2012-5-2 10:47 编辑

[au3]#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)[/au3]

评分

参与人数 1金钱 +20 收起 理由
MacroStudio + 20 感谢

查看全部评分

 楼主| 发表于 2012-5-2 10:51:09 | 显示全部楼层
回复 2# netegg


    谢谢蛋蛋
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-30 13:16 , Processed in 0.107479 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表