Retrieve program version as it is in Add/Remove Programs??

  • Thread starter Thread starter Eddy Fuchs
  • Start date Start date
E

Eddy Fuchs

Hi folks,

I'm searching on this issue since a couple of days:

How do I programmatically retrieve the version of an installed
program? Is there a possibility to retrieve it via the local MSI
database? Or do I have an other chance to get to this information? I
need to retrieve it because I do have to check if an update of my app
is necessary. But therefore I need to know what Version currently is
installed.

It drives me insane, because there is no chance to get this
version-info - besides checking each DLL or assembly for the version,
which is not that kind of reliable...

Does anybody have a glue? Perhaps via MSI?

TIA!
Eddy
 
Hi Eddy,

It's in the registry - but the form is cryptic indeed. Every application and
package installed via MSI has a GUID, and you should know the GUID to
retrieve the information on an application or a package.

Check out the following keys:

HKEY_CURRENT_USER\Software\Microsoft\Installer\Products
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData
 
Back
Top