"List Installed Software" returns an incomplete list.

Discussion in 'Scripting' started by Gabriel/TFI, Mar 19, 2007.

  1. Gabriel/TFI

    Gabriel/TFI Guest

    I tried the script "List Installed Software" taken from ScriptCenter
    http://www.microsoft.com/technet/scriptcenter/scripts/apps/user/usapvb06.mspx?mfr=true

    The file is created, but many software are missing in the list, such as "SAP
    Front End", "Sound MAX", "Same Time 6.5.1", "LiveUpdate 3.1", "Windows
    Installer 3.1", etc...
    I can see the Uninstall info for the missing programs in the registry
    "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall"

    Someone can tell me why?

    Some additional infos:
    - the machine was originally prepared with SysPrep
    - the machine was migrated with ADMT

    Thanks,
    Gabriele
     
    Gabriel/TFI, Mar 19, 2007
    #1
    1. Advertisements

  2. Gabriel/TFI

    Miztiik Guest

    i used the same script.but i only get the headers and no installed softwares
    are listed there

    wat is the problem

    Here is my script

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objTextFile = objFSO.CreateTextFile("C:\CSW\Scripts\software.tsv", True)

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colSoftware = objWMIService.ExecQuery _
    ("Select * from Win32_Product")

    objTextFile.WriteLine "Caption" & vbtab & _
    "Description" & vbtab & "Identifying Number" & vbtab & _
    "Install Date" & vbtab & "Install Location" & vbtab & _
    "Install State" & vbtab & "Name" & vbtab & _
    "Package Cache" & vbtab & "SKU Number" & vbtab & "Vendor" & vbtab _
    & "Version"

    For Each objSoftware in colSoftware
    objTextFile.WriteLine objSoftware.Caption & vbtab & _
    objSoftware.Description & vbtab & _
    objSoftware.IdentifyingNumber & vbtab & _
    objSoftware.InstallDate2 & vbtab & _
    objSoftware.InstallLocation & vbtab & _
    objSoftware.InstallState & vbtab & _
    objSoftware.Name & vbtab & _
    objSoftware.PackageCache & vbtab & _
    objSoftware.SKUNumber & vbtab & _
    objSoftware.Vendor & vbtab & _
    objSoftware.Version
    Next
    objTextFile.Close
     
    Miztiik, Mar 20, 2007
    #2
    1. Advertisements

  3. Gabriel/TFI

    Gabriel/TFI Guest

    Self-answer:
    "The Win32_Product WMI class represents products as they are installed by
    Windows Installer".
    http://msdn2.microsoft.com/en-us/library/aa394378.aspx

    So it returns only programs that were installed through an MSI package.

    "Q 13. How do I list all the installed applications on a given machine?
    The Win32_Product WMI class represents applications installed by Windows
    Installer. However, this WMI class may not list all the installed
    applications that appear in Add or Remove Programs. One solution to this
    problem is to gather data on installed applications from the registry (note
    that not all applications write to the registry when they are installed)".
    http://www.microsoft.com/technet/scriptcenter/resources/wmifaq.mspx

    Gabriele
     
    Gabriel/TFI, Mar 20, 2007
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.