Dim $computer ="computer name" Dim $Remoteuser ="Login account" Dim $Remotepass = "Password" $objlocator= ObjCreate("wbemscripting.swbemlocator") $objWMIService = $objlocator.connectserver($computer,"root/cimv2",$Remoteuser,$Remotepass) $colItems = $objWMIService.ExecQuery("Select * from Win32_Product") For $objSoftware in $colItems ConsoleWrite( "Name: " & $objSoftware.Name & @CRLF ) ConsoleWrite( "Version: " & $objSoftware.Version & @CRLF) Next
WMI 在MSDN上的介绍路径:http://msdn.microsoft.com/en-us/library/aa394554.aspx
WMI命令是非常有用的,可以远程操控计算机等,细节就请看MSDN或者百度一下吧。