Get Installed Version information

  • Thread starter Thread starter Adrian Dev
  • Start date Start date
A

Adrian Dev

Hi,

Installed products all have an entry in the registry. To get a particular products version using basic registry manipulation, would involve enumerating all the hives, searching for the product name, as the hive name is a code.

Is there a fuction to get the 'DisplayVersion' for an installed product directly ?


thanks, Adrian
 
If your using C# and have the version stored in an app.config file, you
can retrieve programmatically using the following code snippet:

using System.Reflection;

string VersionNumber =
Assembly.GetEntryAssembly().GetName().Version.Major.ToString() + "." +
Assembly.GetEntryAssembly().GetName().Version.Minor.ToString();

Bill
 
If your using C# and have the version stored in an app.config file, you
can retrieve programmatically using the following code snippet:

using System.Reflection;

string VersionNumber =
Assembly.GetEntryAssembly().GetName().Version.Major.ToString() + "." +
Assembly.GetEntryAssembly().GetName().Version.Minor.ToString();

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top