How do you find the Install location of the .NET Framework?

G

Guest

Hi,

I would like to find the Install location of the .NET Framework at runtime, so I can run InstallUtil.exe.
The only way I can think of is to use the Environment variable 'windir' and add '\Microsoft.NET\Framework\v1.1.4322' to the end of it.

I would also like to confirm the .NET Framework version number at Runtime.

Any assistance you can provide would be appreciated.

Thanks,

Kent Moyle
 
E

Ed Kaim [MSFT]

It is installed to "C:\WINDOWS\Microsoft.NET\Framework". I don't think this
can be changed.

The version can be retreived from Environment.Version.

Kent Moyle said:
Hi,

I would like to find the Install location of the .NET Framework at
runtime, so I can run InstallUtil.exe.
The only way I can think of is to use the Environment variable 'windir'
and add '\Microsoft.NET\Framework\v1.1.4322' to the end of it.
 
N

Nick Gallimore

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


Nick Gallimore


Kent Moyle said:
Hi,

I would like to find the Install location of the .NET Framework at
runtime, so I can run InstallUtil.exe.
The only way I can think of is to use the Environment variable 'windir'
and add '\Microsoft.NET\Framework\v1.1.4322' to the end of 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