Список установленных программ

Option explicit
Dim objWMIService ' holds connection to wmi
Dim colItems ' holds collection of items that comes back from execQuery method
Dim ObjItem ' used to iterate through the collection
   Set objWMIService = GetObject("winmgmts:\\")
   Set colItems = objWMIService.ExecQuery("SELECT * FROM AddRemovePrograms")

   For Each ObjItem In colItems
      WScript.Echo "DisplayName: " & objItem.DisplayName
      WScript.Echo "Publisher: " & objItem.Publisher
      WScript.Echo "Version: " & objItem.Version
      WScript.Echo
   Next
Интересное на сайте: 
0
Голосов пока нет

Оставить комментарий