How to get Add/Remove Programs - "Support Information" for a program programatically
I'm writing a program and I need to get the version number and publisher programatically. If I go into add/remove programs and select a program I can then click on "Click here for support in开发者_如何学Cformation" (most programs honour it) and it will then bring up a version number and a publisher for the selected program.
I am currently getting the list of program names via the registry key SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall which works well but am stuck on how to get version numbers.
Most applications have a string value called "DisplayVersion" under their key in the location you specified.
The DisplayVersion string inside each Uninstall entry (that has one) should be useful. Unfortunately, it's not guaranteed to be there.
精彩评论