|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Determining .NET Install DirectoriesAll:
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 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 > > 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. -- Show quoteHide quoteCarlos 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 "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 > >
Other interesting topics
|
|||||||||||||||||||||||