Solved

How can I check whether .NET Framwork 2.0 is installed or not?

Posted on 2007-11-27
10
292 Views
Last Modified: 2010-04-05
Hi,

How can I check whether .NET Framwork 2.0 is installed or not through a Win32 Delphi app?

Thanks.
0
Comment
Question by:EEssam
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 9

Expert Comment

by:unassassinable
ID: 20360305
In control pannel open "add/Remove programs"  the list is in alphabetic order.  Look for Microsoft .Net Framwork
0
 
LVL 9

Expert Comment

by:unassassinable
ID: 20360313
or I could finnish reading the entire question before I hit post...sorry didnt notice the "a Win32 Delphi app?" part.  
0
 
LVL 9

Expert Comment

by:mystics7
ID: 20360329
The NET runtime installs a registry key, you can check it.

For example,
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramewor k\policy\v1.1

for version 1.1.

http://msdn2.microsoft.com/en-us/library/ydh6b3yb.aspx
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 9

Expert Comment

by:mystics7
ID: 20360335
i should have done the same thing.... finish reading!!!!!
0
 
LVL 18

Accepted Solution

by:
Johnjces earned 500 total points
ID: 20360906
Here is some Delphi code in a button click event.

uses
  Regsitry;
procedure TForm1.Button1Click(Sender: TObject);
var
 Reg : TRegistry;
begin
 Reg := TRegistry.Create;
 Reg.RootKey := HKEY_LOCAL_MACHINE; 
 if Reg.KeyExists('\SOFTWARE\Microsoft\.NETFramework\policy\v1.1') then
  ShowMessage('.NET version 1.1 Found');
 if Reg.KeyExists('\SOFTWARE\Microsoft\.NETFramework\policy\v2.0') then
  ShowMessage('.NET version 2.0 Found');
 if Reg.KeyExists('\SOFTWARE\Microsoft\.NETFramework\policy\v3.0') then
  ShowMessage('.NET version 3.0 Found');
 Reg.Free; 
end;

Open in new window

0
 
LVL 18

Expert Comment

by:Johnjces
ID: 20360910
I have got to check my spelling!

uses
 Registry;

John
0
 

Author Comment

by:EEssam
ID: 20361274
Thanks, it worked but why you're checking "policy" folder not just:

\SOFTWARE\Microsoft\.NETFramework\vXXX

?
0
 
LVL 18

Expert Comment

by:Johnjces
ID: 20361887
Because there is no key there, that I can find, with that designator, I.E.,

\SOFTWARE\Microsoft\.NETFramework\v1.1 does not exist.

Those keys are listed under policy,

SOFTWARE\Microsoft\.NETFramework\policy\v1.1 and does exist.

John
0
 

Author Comment

by:EEssam
ID: 20366609
Are you sure you don't have the key? I have it:

\SOFTWARE\Microsoft\.NETFramework\v1.1.4322

Please check it again.
0
 
LVL 18

Expert Comment

by:Johnjces
ID: 20366973
I do not on my PC here. But I do have

\SOFTWARE\Microsoft\.NETFramework\2.0.40607
and
\SOFTWARE\Microsoft\.NETFramework\2.0.40903
and
\SOFTWARE\Microsoft\.NETFramework\2.0.50727

You should still have the core version listed under policy and I believe that is what you were seeking.

John
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question