adamcort@gmail.com wrote:[color=blue]
> I am trying to create a simple page for users to log printer issues on
> our PS4 Citrix farm.
>
> I have created a simple html form and published it on our intranet,
> the form only asks too questions, Users Department and Problem
> description.
>
> I however, am collecting more pertinant information on the asp
> submission page. (time, date, username, IP address, etc)
>
> The problem is I am trying to collect the OSVersion and Local Computer
> Name as well.
>
> When I try using;
>
> Set objNet = CreateObject("WScript.NetWork")
> strLocalName = objNet.ComputerName
>
> strLocalName always gives me the name of the intranet server,
> (basically the same results as using
> Request.ServerVariables("SERVER_NAME").[/color]
:-) Well, duh! The code is running on the server.
[color=blue]
>
> I am trying to get the OS Version by performing a regread;
>[/color]
<snip>[color=blue]
> This also gives we the details of the server and not the client.
>[/color]
:-) Again, duh![color=blue]
> Has anybody done this before, and if so, can you let me know how![/color]
Run this code to see what client information is available to the
server-side code:
<%
dim vars, key
set vars = Request.servervariables
for each key in vars
response.write key & ": " & vars(key) & "<br>"
next
%>
See "HTTP_USER_AGENT"? You can get that directly by:
dim agent
agent = Request.servervariables("HTTP_USER_AGENT")
Then parse the string to get the OS info
(
http://www.google.com/search?hl=en&l...2CGGLD%3A2005-
37%2CGGLD%3Aen&q=parse+OS++from+%22HTTP_USER_AGENT %22+&btnG=Search).
Be aware that this information
1) may not be accurate
2) can be spoofed
The only alternative is to convince the user to allow an ActiveX control
you create to be installed and run on his machine.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.