How to know if .Net framework is installed on the machine?

K

Kumar Bhogaraju

I am a newbie to .Net environment. I am writing a small network program in
C#. How can I make sure that the end user machine has .Net framework?
Because if it doesn't my program probably won't even run.

Thanks
Kumar
 
J

Joanna Carter [TeamB]

"Kumar Bhogaraju" <[email protected]> a écrit dans le message de C0B03BDE.486%[email protected]...

|I am a newbie to .Net environment. I am writing a small network program in
| C#. How can I make sure that the end user machine has .Net framework?
| Because if it doesn't my program probably won't even run.

If you mean, can your program detect whether the framework is installed,
then you would need to have a "bootstrap" program written for Win32 without
..NET that checks for the framework and then launches your real .NET program.

Otherwise your .NET only program would not even run to check for the
framework, because the framework isn't there.

I suppose the ultimate check is, if it doesn't run, the framework isn't
installed :))

Joanna
 
T

Tom

The NET runtime installs a registry key, you can check it.

For example,
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v1.1

for version 1.1.

-- Tom
 
R

Roman

|I am a newbie to .Net environment. I am writing a small network program
in
| C#. How can I make sure that the end user machine has .Net framework?
| Because if it doesn't my program probably won't even run.

If you mean, can your program detect whether the framework is installed,
then you would need to have a "bootstrap" program written for Win32
without
.NET that checks for the framework and then launches your real .NET
program.

for more information, look at this example:
http://msdn2.microsoft.com/en-us/library/ydh6b3yb.aspx
 
R

Roman

|I am a newbie to .Net environment. I am writing a small network program
in
| C#. How can I make sure that the end user machine has .Net framework?
| Because if it doesn't my program probably won't even run.

If you mean, can your program detect whether the framework is installed,
then you would need to have a "bootstrap" program written for Win32
without
.NET that checks for the framework and then launches your real .NET
program.

for more information, look at this example:
http://msdn2.microsoft.com/en-us/library/ydh6b3yb.aspx
 
J

Jon Shemitz

Joanna Carter said:
I suppose the ultimate check is, if it doesn't run, the framework isn't
installed :))

Indeed. One simple solution is to write a console app that does
nothing but return a non-zero result code. If you can run this, and
get the right result, the framework is installed.

This seems (to me) to be simpler than looking for the right registry
key.
 
Joined
Mar 5, 2009
Messages
1
Reaction score
0
Hello All -
Simplest way to check this is: Go to Run -> Type Microsoft.Net, if it opens up a folder, then .Net is installed :)
 
Joined
Jan 1, 2010
Messages
1
Reaction score
0
You can check which versions of .NET Framework you have already in your machine by viewing the folders in:

C:\Windows\Microsoft.NET\Framework

The folders inside the above folder represent Framework versions you have.

Regards
 
Joined
Jan 14, 2010
Messages
6
Reaction score
0
Simplest way to check Dotnet Framework is installed or not.

For frendzzz still looking

Link: downloads.easytools.com/Freebies/DetectDotnet.zip

Download unzip
and run the executable it will give you the message whether dotnet framework is installed on your computer or not.

hope this will help



@li
 
Joined
Jan 14, 2010
Messages
6
Reaction score
0
1. Check Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\InstallRoot
2. Check local directory
%windir%\Microsoft.NET\Framework\<version>
where <version> is
v1.1.4322 - Framework v1.1
v1.0.3705 - Framework v1.0


@li
 
Joined
Jun 23, 2010
Messages
1
Reaction score
0
ok I was looking at the registry key's and I got some messed up ones should I be bothered by ones like

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramewor k\Backroom\HACKED

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\fun\littel\Toy

HKEY_LOCAL_MACHINE\SOFTWARE\bagbag\HACKED

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\LOL\Im\a\virus

for some idk thing why I just dont like how they it comes up...
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top