Computer Programming tricks

Easily Export All Installed Apps From Control Panel To CSV

When you format your PC you might need a list of previously installed software as you have to install them again after formatting. If you don't keep a back up of the list then you might forget some of your useful applications. So it is always recommended to export those information to an Excel file before formatting so that you will never miss any of your important applications.

As there is no direct way to export those information from control panel, I have written a script which will help you for the same. Using VBS you can extract information regarding all installed software from Win32_Product class. I have created two version of the script. One which is not configurable and the other which is configurable means you can set YES/NO in the script to export or not to export a column.

Download here: Non Configurable Version Configurable Version

Export installed Apps

How to use the configurable version

Open the file with any text editor. In the top most part of this script you will find a block where you can explicitly mention YES/NO parameter to specify whether to export or not to export a column in to CSV. For example if you need only Caption and Vendor name then change all other parameters to "NO" except these two.

Developer point of view

The heart of the program lies in the query SELECT * FROM Win32_Product. That means we are executing a query on Win32_product class to fetch those information. After the data is fetched just iterate through it by a for-each loop and extract the rows information. If you want to learn more about Windows Management Instrumentation then refer this Wikipedia article. For getting more information about Win32_product class and its properties visit this page.

9 thoughts on “Easily Export All Installed Apps From Control Panel To CSV”

  1. Hello,

    Thank you very much for the script!

    I am about to re-do my VISTA’s disk and I had a problem to record all installed programs.

    I tried this script and it worked on VISTA, but on XP I got the following error:

    “Microsoft VBScript runtime error: Object doesn’t support this property or method”

    In both cases, I used CLI and typed this:

    Cscript.exe progs.vbs

    where progs.vbs was the above script.

    Any ideas why this would not work with XP?

    Thank you

    Eva in Colorado

      1. instald.vbs(16, 2) Microsoft VBScript runtime error: Object doesn’t support this method: ‘app.AssignmentType’

        instald.vbs is:

        ‘Written by Hari Shankar Das
        ‘Published by http://www.funbutlearn.com
        Set fileObj = CreateObject(“Scripting.FileSystemObject”)
        Set csvFile = fileObj.CreateTextFile(“InstalledApps.csv”)

        Set WMIObject = GetObject(“winmgmts:\.rootcimv2”)
        Set resultSet = WMIObject.ExecQuery (“SELECT * FROM Win32_Product”)
        Msgbox “Export to csv will begin now. It may take some seconds.”,vbokonly,”Message”

        csvFile.WriteLine “AssignmentType,Caption,Description,IdentifyingNumber,InstallDate,InstallDate2,” & _
        “InstallLocation,InstallState,HelpLink,HelpTelephone,InstallSource,Language,LocalPackage,Name,” & _
        “PackageCache,PackageCode,PackageName,ProductID,RegOwner,RegCompany,SKUNumber,Transforms,URLInfoAbout,” & _
        “URLUpdateInfo,Vendor,WordCount,Version”

        For Each app in resultSet
        rowData=rowData & “””” & app.AssignmentType & “””” & “,”
        rowData=rowData & “””” & app.Caption & “””” & “,”
        rowData=rowData & “””” & app.Description & “””” & “,”
        rowData=rowData & “””” & app.IdentifyingNumber & “””” & “,”
        rowData=rowData & “””” & app.InstallDate & “””” & “,”
        rowData=rowData & “””” & app.InstallDate2 & “””” & “,”
        rowData=rowData & “””” & app.InstallLocation & “””” & “,”
        rowData=rowData & “””” & app.InstallState & “””” & “,”
        rowData=rowData & “””” & app.HelpLink & “””” & “,”
        rowData=rowData & “””” & app.HelpTelephone & “””” & “,”
        rowData=rowData & “””” & app.InstallSource & “””” & “,”
        rowData=rowData & “””” & app.Language & “””” & “,”
        rowData=rowData & “””” & app.LocalPackage & “””” & “,”
        rowData=rowData & “””” & app.Name & “””” & “,”
        rowData=rowData & “””” & app.PackageCache & “””” & “,”
        rowData=rowData & “””” & app.PackageCode & “””” & “,”
        rowData=rowData & “””” & app.PackageName & “””” & “,”
        rowData=rowData & “””” & app.ProductID & “””” & “,”
        rowData=rowData & “””” & app.RegOwner & “””” & “,”
        rowData=rowData & “””” & app.RegCompany & “””” & “,”
        rowData=rowData & “””” & app.SKUNumber & “””” & “,”
        rowData=rowData & “””” & app.Transforms & “””” & “,”
        rowData=rowData & “””” & app.URLInfoAbout & “””” & “,”
        rowData=rowData & “””” & app.URLUpdateInfo & “””” & “,”
        rowData=rowData & “””” & app.Vendor & “””” & “,”
        rowData=rowData & “””” & app.WordCount & “””” & “,”
        rowData=rowData & “””” & app.Version & “””” & “,”
        csvFile.WriteLine rowData
        rowData=””
        Next
        Msgbox “Data exported successfully”,vbokonly,”Done”
        csvFile.Close

        1. Yes, I exactly found the reason. Some of the properties in Win32_Product class does not support in Windows XP. So you need to remove only those lines which are not supported in XP. To know which properties are not supported visit this link. Go to individual property description and see whether it is supported or not.

          1. Thank you, Hari, for your prompt reply.
            I will try again on XP later. Have to go now.
            Thanks again, :=)
            Eva in Colorado

          2. Hari,

            I could not leave without trying again.
            What I did was I commented out all the properties except the ‘Caption’ because that all what I really need.
            And it worked!
            Now I have a list I want.

            Thanks again. Appreciate your work.
            Eva in Colorado

          3. Hi again,
            Is there a reason that Mozilla Firefox and PDFCreator are not listed?
            Thanks
            Eva in Colorado

  2. thank you very much for sharing!
    in configurable Version it will be great to define with columne we will sort.
    can you give me a hint how we can sort the output? before open in table view 😉

    many thanks and hold on giid work!

Leave a Reply

Your email address will not be published. Required fields are marked *