Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-11-27
10
Medium Priority
?
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

618 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