Sub liste_pgr()
Dim i As Integer
Application.ScreenUpdating = False
Application.StatusBar = "Recherche en cours ..."
Set objFSO = CreateObject("Scripting.FileSystemObject")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery("Select * from Win32_Product")
libelles = Array("Caption", "Description", "Identifying Number", "Install Date", "Install Location" _
, "Install State", "Name", "Package Cache", "SKU Number", "Vendor", "Version")
For i = 0 To UBound(libelles)
ThisWorkbook.ActiveSheet.Cells(1, i + 1) = libelles(i)
Next i
For Each objSoftware In colSoftware
i = ActiveSheet.Cells(65536, 1).End(xlUp).Row
ThisWorkbook.ActiveSheet.Cells(i + 1, 1) = objSoftware.Caption
ThisWorkbook.ActiveSheet.Cells(i + 1, 2) = objSoftware.Description
ThisWorkbook.ActiveSheet.Cells(i + 1, 3) = objSoftware.IdentifyingNumber
ThisWorkbook.ActiveSheet.Cells(i + 1, 4) = objSoftware.InstallDate2
ThisWorkbook.ActiveSheet.Cells(i + 1, 5) = objSoftware.InstallLocation
ThisWorkbook.ActiveSheet.Cells(i + 1, 6) = objSoftware.InstallState
ThisWorkbook.ActiveSheet.Cells(i + 1, 7) = objSoftware.Name
ThisWorkbook.ActiveSheet.Cells(i + 1, 8) = objSoftware.PackageCache
ThisWorkbook.ActiveSheet.Cells(i + 1, 9) = objSoftware.SKUNumber
ThisWorkbook.ActiveSheet.Cells(i + 1, 10) = objSoftware.Vendor
ThisWorkbook.ActiveSheet.Cells(i + 1, 11) = objSoftware.Version
Next
Application.StatusBar = ""
Application.ScreenUpdating = True
End Sub