fuinei 发表于 2012-5-17 12:05:51

回复 15# 502762378

谢谢502762378兄的指导,正则确实有点复杂,但使用stringsplit效果也不错可满足要求,代码修改为:Local $test_PC = "PC1"
Local $log = "c:\logonuser.txt"
Local $cmd = "c:\psloggedon.exe \\" & $test_PC & " >" & $log
RunWait(@ComSpec & " /c " & $cmd,"", @SW_HIDE)
Local $file = FileOpen($log,0)
$logonuserinfo = FileReadline($file,8)
$logonuser = StringSplit($logonuserinfo, ' ')
MsgBox("","",$logonuserinfo)
MsgBox("","",$logonuser)
FileClose($file)
fileDelete($log)
再次感谢!
页: 1 [2]
查看完整版本: [已解决]使用WMI获指列表中PC的硬盘信息