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.
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.