本帖最后由 onepc 于 2011-3-16 07:55 编辑 ;远程连接计算机的WMI
;root/default:StdRegProv
Func _ConnectDefault($Comp,$User,$Pass)
If $comp==@ComputerName Then
$objServiceReg = ObjGet("winmgmts:\\.\root\default:StdRegProv")
Else
$objLocatorReg = ObjCreate("WbemScripting.SWbemLocator")
$objServiceReg = $objLocatorReg.ConnectServer($Comp, "root\default:StdRegProv",$User,$Pass)
$objServiceReg.Security_.ImpersonationLevel = 3
;$objInfos = $objService.ExecQuery("select * from Win32_Process")
EndIf
EndFunc
c
Dim $objInfos
_GUICtrlListView_DeleteAllItems($ListView5);清空方法列表
$objService.EnumKey($HKLM,$strUnKey,$objInfos)
;objReg.EnumKey HKLM, strBaseKey, arrSubKeys
;$objInfos = $objServiceReg.ExecQuery("")
For $objInfo In $objInfos
;GUICtrlCreateListViewItem($objInfo.name&"|"&$objInfo.Description,$ListView5)
MsgBox(0,"",$objInfo)
Next
呃,我开始是这样的.怎么我的弹不出来的,,,,,,,, |