Home All Groups Group Topic Archive Search About

Determining .NET Install Directories

Author
8 Feb 2005 8:57 PM
John Puopolo
All:

This *should* be a simple question, but I cannot find a definitive answer on
the net so....

I have both versions 1.1 and versions 2.0 of the CLR/.NET installed on my
machine.  I want to get a list of the root directories under which these
live.  I can use the following statments to get the most recent info...

System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory();
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion();

However, how do I get a list (similar to what these methods yield) for the
v1.1 as well?  In other words, is there a definitive way to iterate the .NET
installation dirs?

Thanks,
John

Author
9 Feb 2005 2:56 PM
Mujtaba Syed
Using the config file, make the version whose root directories your need, a "required" version.

<configuration>
    <startup>
        <requiredRuntime version="1.0.3705"/>
    </startup>
</configuration>

Mujtaba.

Show quoteHide quote
"John Puopolo" <john.puop***@fastsearch.com.nospam> wrote in message news:%23pgSSDiDFHA.1524@TK2MSFTNGP09.phx.gbl...
> All:
>
> This *should* be a simple question, but I cannot find a definitive answer on
> the net so....
>
> I have both versions 1.1 and versions 2.0 of the CLR/.NET installed on my
> machine.  I want to get a list of the root directories under which these
> live.  I can use the following statments to get the most recent info...
>
> System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory();
> System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion();
>
> However, how do I get a list (similar to what these methods yield) for the
> v1.1 as well?  In other words, is there a definitive way to iterate the .NET
> installation dirs?
>
> Thanks,
> John
>
>
Are all your drivers up to date? click for free checkup

Author
9 Feb 2005 3:51 PM
Carlos J. Quintero [.NET MVP]
The registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework,
InstallRoot tells you the home directory of .NET Frameworks.

The registry entry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy tells you the
versions installed.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com


Show quoteHide quote
"John Puopolo" <john.puop***@fastsearch.com.nospam> escribió en el mensaje
news:%23pgSSDiDFHA.1524@TK2MSFTNGP09.phx.gbl...
> All:
>
> This *should* be a simple question, but I cannot find a definitive answer
> on
> the net so....
>
> I have both versions 1.1 and versions 2.0 of the CLR/.NET installed on my
> machine.  I want to get a list of the root directories under which these
> live.  I can use the following statments to get the most recent info...
>
> System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory();
> System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion();
>
> However, how do I get a list (similar to what these methods yield) for the
> v1.1 as well?  In other words, is there a definitive way to iterate the
> .NET
> installation dirs?
>
> Thanks,
> John
>
>

Bookmark and Share