473,396 Members | 1,864 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,396 software developers and data experts.

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 1301
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**************@TK2MSFTNGP12.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****************@TK2MSFTNGP12.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**************@TK2MSFTNGP12.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****************@TK2MSFTNGP14.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****************@TK2MSFTNGP12.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**************@TK2MSFTNGP12.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.userAgent to look for that substring to check whether the
..NET framework runtime is installed:

function checkNETFramework (version)
{
var pattern = new RegExp('.NET CLR ' + version);
return pattern.test(navigator.userAgent);
}

if (checkNETFramework('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.UserAgent.IndexOf(".NET 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
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...
6
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...
6
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...
7
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...
6
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,...
0
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...
14
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...
1
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...
8
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
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...
0
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,...

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.