Reputation: 129
can anyone please help me to find out the display name and version of all installed softwares of a machine by using "Reg Query"?
if we use "/s" option with "reg query" then we will get all subkeys and value names recursively, but i need only display name and display version of each and every software. .
Upvotes: 2
Views: 8590
Reputation: 1962
Its an old post but these commands can give you desired output. Both display name and version cannot be obtained at once but you can do one by one
Reg Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall /S /v DisplayName
Reg Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall /S /v DisplayVersion
other way around would be to combine the results with Find command to filter.
Upvotes: 1
Reputation: 129
exceute the below command "REG QUERY HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall /s"
split the output of above command using "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\" to get the array of strings. Now parse the each string for software display name and version.
Regular expressions for getting displayname and version are:
Displayname: "(.*)" + "DisplayName" + @"\s+REG_SZ\s+(.*)\s"
Displayversion: "(.*)" + "DisplayVersion" + @"\s+REG_SZ\s+(.*)\s"
Upvotes: 2