Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2005
    Posts
    203

    Arrow 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

  2. #2
    Join Date
    May 2005
    Posts
    39
    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:
    Code:
    <%
    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:
    Code:
    <%
    Dim UserAgent
    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"
    else
        response.write "Well I don't know what the hell you're using"
    End if
    End Function
    %>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •