Is there a way, using purely JavaScript or similar, to check if the client machine has .NET installed?
Printable View
Is there a way, using purely JavaScript or similar, to check if the client machine has .NET installed?
Presumably this would mean you have to see if a file exists on the clients PC. JavaScript cannot read files or even check to see if they are there, and that's a good thing. Otherwise it would be a huge security concern.
Not necessarily, although that might be one way. There are registry entries also, and indeed other mechanisms, about which I have no idea.
Sure a browser should not access the files, or the registry, but I do know this is possible, I just don't know how to do it. For example, I have seen a browser application that tests if .NET is installed on the client machine. This is not even done in a .NET language. I'm not sure if it's a HTTP header or what the heck, I do know that it only works if the browser is IE.
Perhaps some object model that can query this? I don't know. Like I said, I know it's possible, I just don't know how to do it. I'd like to find out how.
Mike
There might be a way to check in IE. After installing the .NET framework , it may append something to the user agent string too.
Have you tried asking this question in one of the .NET forums?
No, I did not ask this question in any forum but this one. I wasn't really sure where to post. I'm guessing it's a IE/JavaScript type of thing, so I posted here.
.Net does indeed append something to IE's user agent string. CLR 1.0.3905235 or something to that effect for .Net 1.0, and CLR 1.1.12482245 for .Net 1.1.
navigator.userAgent can be used in JS to obtain this string.
This is my IE's UA:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
No other browser does this.
Cool CornedBee, I appreciate the info.
Mike