Solved

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

Posted on 2007-11-27
10
290 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
 
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now