Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- strComputer = "."
- Set objWMIService = GetObject("winmgmts:" & _
- "{impersonationLevel=impersonate}!\" & _
- strComputer & _
- "rootcimv2")
- Set colSoftware = objWMIService.ExecQuery _
- ("SELECT * FROM Win32_Product")
- If colSoftware.Count > 0 Then
- For Each objSoftware in colSoftware
- WScript.Echo objSoftware.Caption & vbtab & _
- objSoftware.Version
- Next
- Else
- WScript.Echo "Cannot retrieve software from this computer."
- End If
Add Comment
Please, Sign In to add comment