Programmatically to check if the .NET framework isinstalled.

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
 
G

Guest

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
 
D

DraguVaso

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...
 
G

Guest

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
 
D

DraguVaso

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 :)
 

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