Whenever I need some enviroment information I always tries to read the wanted values from Windows registry. In VB.NET this is as rather straightful process as we have access to the namespace “Microsoft.Win32′ which includes the class to work with the registry.
Recently I had a need to find out if Excel is installed and if so if the version is 2002 or later was available. Since I’m also trying to learn how to use regular expression I took this opportunity to use it.
The following code shows the function and how to get the wanted information from the registry:
The above approach works in both Windows XP and Windows Vista and it does not require that users must have administrative rights.
The code can also be downloaded as a textfile here.
Kind regards,
Dennis