Bonjour,

J'utilise le code ci-dessous trouvé sur la FAQ développez.net
https://access.developpez.com/faq/?p...og#Listerappli
Il fonctionne bien, mais il ne ramène pas des programmes tels que Mozilla (ie également, mais je n'ai jamais réussi à le trouver même dans panneau de configuration), flash player etc...

Pour info, je suis sous Windows 10 64 bits, alors WIN32_PRODUCT est-il la bonne commande à utiliser ?

Par avance merci pour votre aide ?

JPG

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Sub ListSoft()
 
    strComputer = "."
 
    Set objWMIService = GetObject("winmgmts:" & _
        "{impersonationLevel=impersonate}!\\" & _
        strComputer & _
        "\root\cimv2")
 
    Set colSoftware = objWMIService.ExecQuery _
        ("SELECT * FROM Win32_Product")
 
    If colSoftware.Count > 0 Then
 
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Set objTextFile = objFSO.CreateTextFile( _
            "c:\temp\SoftwareList.txt", True)
 
        For Each objSoftware In colSoftware
            objTextFile.WriteLine objSoftware.Caption & vbTab & _
            objSoftware.Version
        Next
 
        objTextFile.Close
 
    Else
        WScript.Echo "Cannot retrieve software from this computer."
 
    End If
 
End Sub