I have a script which finds specific installed software but I am having trouble also getting the software's version. For example, say I am getting a list of all Microsoft software installed. Here is what I have thus far:
echo software installed > software_list.txt
echo ================= >>software_list.txt
reg export HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall temp1.txt
find "Microsoft" temp1.txt| find "DisplayName" > temp2.txt
for /f "tokens=2,3 delims==" %%a in (temp2.txt) do (echo %%a >> software_list.txt)
start notepad "software_list.txt"
del temp1.txt temp2.txt
How can I also get the DisplayVersion from the reg export? If I replace DisplayName with DisplayVersion, nothing is even found. Or, is there another avenue I should be taking here?