473,614 Members | 2,361 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Script to tell if .Net is installed or not.

Our company provides two downloads for our program, one includes the .Net
and the other does not. The problem is that the most of the times the user
has no idea if he or she already has the .Net installed on their local
computers or not so they are never sure if they should take the time to
download .Net only to find out that is already installed.

Is there a way to implement a button on a web page that a user can click and
popup a message box indicating if the .Net is already installed in their
local computer?

Thanks


Dec 12 '05 #1
4 1315
You can do that...as long as the browser is IE, if you're doing it online.

For an example of that, see :
http://msdn.microsoft.com/library/de.../useragent.asp

If you don't need to detect while online, download sample code here :

http://blogs.msdn.com/astebner/archi...18/231253.aspx

Or, if you want to detect from a Visual Studio deployment project, see this :
http://support.microsoft.com/kb/315291/en-us


Juan T. Llibre
ASP.NET MVP
============
"Rene" <no****@nospam. com> wrote in message news:eo******** ******@TK2MSFTN GP12.phx.gbl...
Our company provides two downloads for our program, one includes the .Net and the other does not.
The problem is that the most of the times the user has no idea if he or she already has the .Net
installed on their local computers or not so they are never sure if they should take the time to
download .Net only to find out that is already installed.

Is there a way to implement a button on a web page that a user can click and popup a message box
indicating if the .Net is already installed in their local computer?

Thanks

Dec 12 '05 #2
Thanks I will play around with this. By the way, we use Firefox as our
default browser and preliminary testing appear that it also works in Firefox
unless I am doing something wrong!

Am I missing something, why did you say the html version only works on IE?
Just curios.

Thanks
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
You can do that...as long as the browser is IE, if you're doing it online.

For an example of that, see :
http://msdn.microsoft.com/library/de.../useragent.asp

If you don't need to detect while online, download sample code here :

http://blogs.msdn.com/astebner/archi...18/231253.aspx

Or, if you want to detect from a Visual Studio deployment project, see
this :
http://support.microsoft.com/kb/315291/en-us


Juan T. Llibre
ASP.NET MVP
============
"Rene" <no****@nospam. com> wrote in message
news:eo******** ******@TK2MSFTN GP12.phx.gbl...
Our company provides two downloads for our program, one includes the .Net
and the other does not. The problem is that the most of the times the
user has no idea if he or she already has the .Net installed on their
local computers or not so they are never sure if they should take the
time to download .Net only to find out that is already installed.

Is there a way to implement a button on a web page that a user can click
and popup a message box indicating if the .Net is already installed in
their local computer?

Thanks


Dec 12 '05 #3
Actually, the sample script does not work at all...... mmmm I wonder if I am
I doing something wrong.

"Rene" <no****@nospam. com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Thanks I will play around with this. By the way, we use Firefox as our
default browser and preliminary testing appear that it also works in
Firefox unless I am doing something wrong!

Am I missing something, why did you say the html version only works on IE?
Just curios.

Thanks
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
You can do that...as long as the browser is IE, if you're doing it
online.

For an example of that, see :
http://msdn.microsoft.com/library/de.../useragent.asp

If you don't need to detect while online, download sample code here :

http://blogs.msdn.com/astebner/archi...18/231253.aspx

Or, if you want to detect from a Visual Studio deployment project, see
this :
http://support.microsoft.com/kb/315291/en-us


Juan T. Llibre
ASP.NET MVP
============
"Rene" <no****@nospam. com> wrote in message
news:eo******** ******@TK2MSFTN GP12.phx.gbl...
Our company provides two downloads for our program, one includes the
.Net and the other does not. The problem is that the most of the times
the user has no idea if he or she already has the .Net installed on
their local computers or not so they are never sure if they should take
the time to download .Net only to find out that is already installed.

Is there a way to implement a button on a web page that a user can click
and popup a message box indicating if the .Net is already installed in
their local computer?

Thanks



Dec 12 '05 #4
Hope that will help (I got it from somebody recently, did not try
though :))

The user agent string of Internet Explorer is changed to contain e.g.
..NET CLR 2.0.50727 so with script inside of IE you could parse
navigator.userA gent to look for that substring to check whether the
..NET framework runtime is installed:

function checkNETFramewo rk (version)
{
var pattern = new RegExp('.NET CLR ' + version);
return pattern.test(na vigator.userAge nt);
}

if (checkNETFramew ork('2.0')) { ... }

But don't expect other browsers to expose the MS .NET framework version
in the user agent string.
And there is no need to depend on client-side script to check the user
agent string, it is usually sent as a HTTP request header and that is
exposed server side in ASP.NET e.g. you could check
Request.UserAge nt.IndexOf(".NE T CLR " + "2.0") > -1

Dec 13 '05 #5

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

Similar topics

2
27526
by: Yunxian Mak | last post by:
Dear Sir/Madam, I'm doing my PhD in APAF and I installed Python 2.2 interpreter in WindowNT before and it worked OK on my old computer. However, our company has upgraded the systems to WindowXP recently. I installed Python2.2.3, which includes IDLE (Python GUI), Module Docs, Python (command line) and Python Manuals, on my new computer. I can open my Python code from IDLE (Python GUI), but I don't know how to run it. If you could please...
6
5549
by: George Hester | last post by:
This location has a parasite checker using javascript. It is in a js file called parasite.js. It is freely available. http://www.doxdesk.com/parasite/ He\She is the only one I trust on the Net who has such a thing. But their js I believe cannot detect coolwebsearch parasites which are the most common such parasites on the Net today. So I'd like to incorporate a check for those parasites in the js. Any suggestions on how this can...
6
27368
by: opt_inf_env | last post by:
Hello, I have found, that one can generate a nice font with the usage of the following line (for example): <font face="Edwardian Script ITC" size="7"> Very nice </font> Do you know whether this script is supported by all operation systems (browsers?)? It is installed by default in Windows? What about Linux? Do you know where one can find relatively full list of fonts which are
7
3284
by: RFS666 | last post by:
Hello, I would like to use variables with a type in jscript.NET. I declare them as follows: var x : double = 5.03; This doesn't work in my script, that I write to the page in codebehind with "registerClientScriptBlock" as follows: string script = "<script language=jscript>"; script += "function test()";
6
2801
by: BookerW | last post by:
Ok interesting, on my local machine And i did not do a good job of keeping track of the exact order.... but on my local machine in which i have vis studio 2003 installed and IIS for win XP, I copied the web.config file from the source code folder into the inetpub\wwwroot folder b/c that is where the ASP engine was looking for it.
0
4430
by: Bev | last post by:
Hello :-), I am not sure if I am in the right forum so please forgive me if I err. My Ops is XPPro, SP2 installed, IE6 and Outlook Express6, Office 2002. I am using ready made scripts in htm format and I am getting script errors. I cannot view the script in IE6, Front Page or Outlook. It keeps asking me if I want to debug. I have no idea on how to debug! When I post the work I have done to a group, (I fly blind), my fellow members...
14
6090
by: mistral | last post by:
Need php script to create mySQL database programmatically; since hosting configuration may not allow create database from script, script also need eliminate/rewrite all restrictions in appropriate places in that hosting.
1
1062
by: jinny | last post by:
hi ! i have to installed phpMyspace clone script on my localhost, but i dont hav any suitable or proper instruction to install , plz give me the detailed installtion that how i can installed phpMyspace clone script on my LOCALHOST... and one thing more tell me first that either that script can run on localhost or on domain.... plzplzpzlpzlzplzpzlpzlzplzplzp,, im very disturbedddddddddddddddddd thanx help
8
8251
by: Kjell Pettersen | last post by:
Hello! I have installed PHP and MySql 5.0 on Win XP. Database created ok. Installation ok. PHP scripts runs ok. But when I am trying some mysql calls in the script I get an "Error 500" from explorer. // Connect to the database server echo ('Trying to connect to db');
0
8124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8621
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8272
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5538
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4119
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2565
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1712
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1421
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.