Unanswered: how to view client registery values using asp script
Hi all. i want to make a asp script that can read certian client registery values but i do not know how to write it. I be happy if an expert show me how.i think it could be done because i have seen html pages that show what version of windows and what browser ect... and i assume that they got this from the registry.Thanks
If it were just that easy to get a client's registry values from his computer, it would open up a world of security problems.
However, anytime you surf the internet your browser is sending page headers to all the sites; so when an ASP page knows your browser or what Windows version you're using, its not actually reading a clients registry values, its reading a client's browser headers. You use the Request.Servervariables to get that information:
response.write "Your browser is: " & Request.Servervariables("HTTP_USER_AGENT")
Usually, the information the HTTP_USER_AGENT can also tell you what operating system a client is using, and maybe even their version of Windows, but it usually takes some parsing. The general way to do this works like this:
UserAgent = Request.ServerVariables("HTTP_USER_AGENT")
If instr(sUserAgent, "Mac") then
response.write "You're using a Mac"
elseif instr(sUserAgent, "MSIE") then
response.write "You're using a PC"
response.write "Well I don't know what the hell you're using"