Programmatically to check if the .NET framework isinstalled.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a C++ application from which i can start a .NEt library as a dialog
from the toolbar menu. If the .NET framework is not installed i want to gray
out the toolbar button that starts the .NET dialog component. So my question
is:

Is there any way to programmatically detect if the .NET framwork is
installed. This code should of course be written in C++ code that starts the
..NET componenet.

Thanks
Bilal
 
Thanks very much for the quick answer. It was very helpfull.

But what do I do if I want to check generally if .NET framework is installed
and not a specific version of the framework ? I am not intersted to only
check that version 1.1 is isntalled. Version 1.0 and future versions should
also be included...

Thanks.
Bilal
 
You can check on 1.0, 20. and 1.1 SP1 (SP = 1) the same way.
But to be really independent of the version, I guess you better see if there
is a certain .NET-dll installed.

Although I'm not sure if this will be really necessary, because your .NET
component will need a certain version of the .NET-fremwork, so you will now
in advance for which version you have to look for...
 
OK.
I just thought that the framework will be backward compatible. I t would be
nice if the version information was a value in the key instead of the key
itself so it was possible to check upon the version, fx. check that
installed_version>=1.1 :-)

Thanks
Bilal
 
I t would be
nice if the version information was a value in the key instead of the key
itself so it was possible to check upon the version,

It would indead be a little bit more easy, but because of the fact that you
can have more than one version of the framework isntalled it is better the
way they did it :)
 
Back
Top