JSI Tip 5770. How do I create a report of the installed software on my computer?

Jerold Schulman

September 26, 2002

1 Min Read
ITPro Today logo in a gray background | ITPro Today


NOTE: See How can I generate a .TSV file containing the software installed on my computer?

Using information and techniques from tips 0034 and 1087, I have scripted Installed.bat to generate a CSV file of all the software listed in the Control Panel / Add/Remove Programs applet. The CSV file contains "Short Name","Display Name".

The syntax for using Installed.bat is:

Installed CSV_Folder

where CSV_Folder can be a local folder or a network share. The actual file is "CSV_FolderComputerName.CSV".

NOTE: If you wish to run Installed.bat on all the computers in your domain, use tip 4195, with the CSV_Folder being a network share.

Installed.bat contains:

@echo offsetlocalif {%1}=={} goto Syntaxif not exist %1*.* goto Syntaxset folder=%1set folder=%folder:"=%set /a cntrpt=0if exist "%folder%%computername%.csv" del /q "%folder%%computername%.csv"regedit /a "%temp%Installed.reg" "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall"for /f "Skip=4 Tokens=1,2,7 Delims=\]=" %%a in ('type "%temp%Installed.reg"') do set p1=%%a&set p2=%%b&set p3=%%c&call :reportif defined app set app="%app:"=%"if defined app set app=%app:[=%if not defined app set app="%key%"if defined key set /a cntrpt=%cntrpt% + 1&@echo "%key%",%app%>>"%folder%%computername%.csv"if exist "%temp%Installed.reg" del /q "%temp%Installed.reg"@echo %computername% has %cntrpt% report lines.endlocalgoto :EOF:Syntax@echo Syntax: Installed ReportFolderendlocalgoto :EOF:reportset p1=%p1:"=%if "%p1:~0,1%" EQU "[" goto newif /i "%p1%" EQU "DisplayName" set app=%p2%goto :EOF:newif defined app set app="%app:"=%"if defined app set app=%app:[=%if not defined app set app="%key%"if defined key set /a cntrpt=%cntrpt% + 1&@echo "%key%",%app%>>"%folder%%computername%.csv"set app=set key=%p3%



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like