PC Review


Reply
Thread Tools Rate Thread

How can I query .NET current version?

 
 
Peter Steele
Guest
Posts: n/a
 
      4th Feb 2005
Is there a registry entry that I can use to find the current active .NET
installation on a system? I know I can use this path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\InstallRoot

to find the base install path. This gives me (on my system)

C:\WINDOWS\Microsoft.NET\Framework

But there doesn't seem to be any obvious key under this that I should use to
find the current .NET version to give me the complete path, e.g.,

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

Is there a key with this information? I am making this query from an
unmanaged C++ app.


 
Reply With Quote
 
 
 
 
Lionel LASKE
Guest
Posts: n/a
 
      4th Feb 2005

From a managed app, you can use "System.Environment.Version" property.
From an unmanaged app, i'm afraid you have no other solution than using
registry.

Lionel.

"Peter Steele" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed)...
> Is there a registry entry that I can use to find the current active .NET
> installation on a system? I know I can use this path
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\InstallRoot
>
> to find the base install path. This gives me (on my system)
>
> C:\WINDOWS\Microsoft.NET\Framework
>
> But there doesn't seem to be any obvious key under this that I should use
> to find the current .NET version to give me the complete path, e.g.,
>
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
>
> Is there a key with this information? I am making this query from an
> unmanaged C++ app.
>
>



 
Reply With Quote
 
Peter Steele
Guest
Posts: n/a
 
      4th Feb 2005
I realize I have to use the registry, that's what my post is about. I was
asking what specific registry entry I should query to obtain this
information?

"Lionel LASKE" <(E-Mail Removed)> wrote in message
news:O13FW%(E-Mail Removed)...
>
> From a managed app, you can use "System.Environment.Version" property.
> From an unmanaged app, i'm afraid you have no other solution than using
> registry.
>
> Lionel.
>
> "Peter Steele" <(E-Mail Removed)> a écrit dans le message de news:
> (E-Mail Removed)...
>> Is there a registry entry that I can use to find the current active .NET
>> installation on a system? I know I can use this path
>>
>> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\InstallRoot
>>
>> to find the base install path. This gives me (on my system)
>>
>> C:\WINDOWS\Microsoft.NET\Framework
>>
>> But there doesn't seem to be any obvious key under this that I should use
>> to find the current .NET version to give me the complete path, e.g.,
>>
>> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
>>
>> Is there a key with this information? I am making this query from an
>> unmanaged C++ app.
>>
>>

>
>



 
Reply With Quote
 
Lionel LASKE
Guest
Posts: n/a
 
      5th Feb 2005

My guess is that you can't.
I think that "current version" has no sense.
When you have both .NET Framework 1.0 and .NET Framework 1.1 installed, you
may have one app running with .NET Framework 1.0 and another app running
with .NET Framework 1.1.
You question is more about .NET Framework used in current process and I'm
afraid that you must use "System.Environment.Version" property (not
accessible from your unmanaged DLL :-( ) in this case.

Lionel.


Just for your information, this article explain how to detect wich versions
are installed:
http://support.microsoft.com/default...5BLN%5D;315291.

"Peter Steele" <(E-Mail Removed)> a écrit dans le message de news:
uGO$(E-Mail Removed)...
>I realize I have to use the registry, that's what my post is about. I was
>asking what specific registry entry I should query to obtain this
>information?
>
> "Lionel LASKE" <(E-Mail Removed)> wrote in message
> news:O13FW%(E-Mail Removed)...
>>
>> From a managed app, you can use "System.Environment.Version" property.
>> From an unmanaged app, i'm afraid you have no other solution than using
>> registry.
>>
>> Lionel.
>>
>> "Peter Steele" <(E-Mail Removed)> a écrit dans le message de news:
>> (E-Mail Removed)...
>>> Is there a registry entry that I can use to find the current active .NET
>>> installation on a system? I know I can use this path
>>>
>>> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\InstallRoot
>>>
>>> to find the base install path. This gives me (on my system)
>>>
>>> C:\WINDOWS\Microsoft.NET\Framework
>>>
>>> But there doesn't seem to be any obvious key under this that I should
>>> use to find the current .NET version to give me the complete path, e.g.,
>>>
>>> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
>>>
>>> Is there a key with this information? I am making this query from an
>>> unmanaged C++ app.
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Belarc Advisor current version query Rose Weir Freeware 2 24th Aug 2004 04:56 AM
Express Version Kills Current Version Lloyd Sheen Microsoft ASP .NET 11 2nd Jul 2004 03:45 PM
Express Version Kills Current Version Lloyd Sheen Microsoft Dot NET Framework 4 29th Jun 2004 11:30 PM
Express Version Kills Current Version Lloyd Sheen Microsoft C# .NET 5 29th Jun 2004 11:30 PM
Install older version of IE over current version ? thinman Windows XP Internet Explorer 8 31st Dec 2003 10:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:11 PM.