Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Obtaining Local NETBIOS name and OS version?

Reply
Thread Tools

Obtaining Local NETBIOS name and OS version?

 
 
adamcort@gmail.com
Guest
Posts: n/a
 
      06-06-2006
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").

I am trying to get the OS Version by performing a regread;

sOStype = oShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProductName")
sOSVersion = oShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\CSDVersion")
sOSBuild = oShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\BuildLab")
strFullOS = sOStype & " " & sOSVersion & "(" & sOSBuild & ")"

This also gives we the details of the server and not the client.

Has anybody done this before, and if so, can you let me know how!

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      06-06-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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").


Well, duh! The code is running on the server.


>
> I am trying to get the OS Version by performing a regread;
>

<snip>
> This also gives we the details of the server and not the client.
>

Again, duh!
> Has anybody done this before, and if so, can you let me know how!



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.


 
Reply With Quote
 
 
 
 
adamv6
Guest
Posts: n/a
 
      06-06-2006
Cheer Bob,

Will try this tommorrow, and post my results.

I was aware that I would get the server name as, hey ASP is s e r v e r
s i d e!!!

However, I did set myself up a little in the post.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Caputuring (netbios) Server Name in ASP.NET Brad Baker ASP .Net 3 09-10-2009 10:45 AM
NetBIOS Name can not pass through the Site-to-Site VPN tunnel Benson Cisco 8 07-14-2005 02:16 AM
VPN and netbios name mmccaws Cisco 2 03-25-2005 04:32 AM
Error 403.6 when using netbios name Iwer M?rck ASP .Net 2 10-10-2004 07:08 PM
NetBIOS Domain Name Michael Tissington ASP .Net 4 05-11-2004 01:11 AM



Advertisments