How do apps usually id the version of the cyrrently installed framework?

M

mookid

Good day group!

My problem is this:
I have an old legacy application, which must be installed using an
unmanaged installer. This unmanaged installer complains that .NETfx 1.1
is not installed, EVEN THOUGH 1.0, 1.1 AND 2.0 are installed, and thus
refuses to install.

The problem seems to be that the installer checks the latest version of
the framework, and sees if it is either 1.0 or 1.1. In the installation
log I can see that 2.0 apparently is an "unknown version".

This leads me to my question:
How do applications usually (in unmanaged code) check which version is
installed?

I know about the %WinDir%\Microsoft.NET\Framework folder, where the
subfolders identify the installed versions. So one way is to check
which folders are present in here.

But are there other ways? There must be some (possibly nasty) ways of
checking this in the registry...

I am looking for a way to temporarily "downgrade" (without uninstalling
the entire .NET 2.0 framework)?

I tried renaming the v2.0.????? folder, but this (of course) fails due
to some conflict (containing files currently open/running/whatever).

I hope someone has some valuable input!

Thanks in advance,
Mogens Heller Jensen
 
M

mookid

Vadym Stetsyak skrev:

It seems that the existance of the keys v?.?
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\
were checked by the installer to identify the version number. This
means that renaming "v2.0" to "foo_v2.0" makes the installer believe
that 1.1 is the newest version, and thus everything works!

Thanks for the input! It really solved my problem!

The best,
Mogens
 
C

Conbine Guard

I the namespace System.Entironment call under that there alot of static fun
one of them will tell you your .net verion
 

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

Top