473,324 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Detecting if .NET Framework installed or not?

Right now, all my VB.NET programs crash on startup if the .NET Framework
isn't installed on the target PC. Is there a graceful way to detect,
notify-in-a-friendly-way, and quit of the application if the .NET Framework
is missing?

--
Jeff S.
Nov 21 '05 #1
4 5640
No. That would require you to have the ability to run some code to figure
this out - which you can't, because the absense of the framework means you
can't run any code.

"Jeff Stewart" <ja*@micronovatech.com> wrote in message
news:1099933011.Drpb9QKj+CLwpPvupKfctQ@teranews...
Right now, all my VB.NET programs crash on startup if the .NET Framework
isn't installed on the target PC. Is there a graceful way to detect,
notify-in-a-friendly-way, and quit of the application if the .NET Framework is missing?

--
Jeff S.

Nov 21 '05 #2
"Jeff Stewart" <ja*@micronovatech.com> schrieb:
Right now, all my VB.NET programs crash on startup if the
.NET Framework isn't installed on the target PC. Is there
a graceful way to detect, notify-in-a-friendly-way, and quit of
the application if the .NET Framework is missing?


This cannot be done using a .NET application. You may want to develop an
application in plain C++ to check if the Framework is installed and call
your .NET application only if this is the case. Alternatively you can
install the .NET Framework during your application's setup.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3
As per Herfried suggestion just use the Installer to detect this for you. If you are installing from
the web you can check the header of the request to see if the user has dotNet installed however.
Depends on your deployment scenario.

hth
Richard
Nov 21 '05 #4
Herfried K. Wagner [MVP] wrote:
"Jeff Stewart" <ja*@micronovatech.com> schrieb:
Right now, all my VB.NET programs crash on startup if the
.NET Framework isn't installed on the target PC. Is there
a graceful way to detect, notify-in-a-friendly-way, and quit of
the application if the .NET Framework is missing?

This cannot be done using a .NET application. You may want to develop
an application in plain C++ to check if the Framework is installed and
call your .NET application only if this is the case. Alternatively you
can install the .NET Framework during your application's setup.


To detect and or install dotnetfx during setup:
http://msdn.microsoft.com/vstudio/do.../bootstrapper/

Rinze
Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: sanket gupta | last post by:
Hi , When installing my application , i want to check whether the dot net runtime is available on the users computer and if its not , then i would like to provide him with a download location....
1
by: Mark Rae | last post by:
Hi, I'm looking for a reliable way of detecting the version of Windows that the ..NET framework is installed on, specifically the service pack. Currently, I'm using System.Environment.OSVersion...
4
by: Vic | last post by:
Hello, All. Is there any way for an ASP.NET page to detect whether a client has .NET framework installed (preferebly to also determine the version). So, the resultant application would look...
6
by: Brad Allison | last post by:
This is another form of a question I posed last night. I know how to detect the .NET Framework using the installer bootstrap, but what if the user wants to not install the program, but run it...
3
by: regtrashcan | last post by:
I have a webpage that detects whether Shockwave Player is installed and the version number. The javascript/vbscript that I use has worked fine until the latest release of the Shockwave Player. I am...
4
by: Ron M. Newman | last post by:
Hi, You install a .NET 2.0 winforms application on a machine that doesn't have the 2.0 redistributables and then run it. How do you elegantly detect that and warn your users? Any way to avoid...
4
by: Arek | last post by:
Hi, How to detect Windows version and .NET version? I mean I want to know if user is using Windows 2000, XP, Vista and which Service Pack and version (XP Home, XP Pro, Vista Home Basic, Vista...
3
by: =?Utf-8?B?QXNhZg==?= | last post by:
Hello, I would like to detect .NET CLR on user computer to notice him if he will need to install .NET 3.5 runtime from IE. I have tried to detect using the code...
13
by: John W. | last post by:
Hi there, Does anyone know if there's a (simple) way to detect whether an arbitrary "System.Type" originates from the .NET framework opposed to a user-defined assembly. Thanks.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.