473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Obtaining Local NETBIOS name and OS version?

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!

Jun 6 '06 #1
2 3915
ad******@gmail.com 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.
Jun 6 '06 #2
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.

Jun 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Mike Malter | last post by:
I really hope this is the place to go for an answer to this question. I am coding a web project on my laptop. I need to write some code that will involve https for the payment part of the app....
2
by: Mike Malter | last post by:
I am having problems using https when calling a page on my local machine. I am running XP professional. All I get is a general error page telling me there are problems with my page. I have...
4
by: Michael Tissington | last post by:
Is it possible to read the NetBIOS domain name and if so how ? -- Michael Tissington http://www.oaklodge.com http://www.tabtag.com
4
by: Nathaniel Sherman | last post by:
Alright, folks, here's the deal... I'm working on migrating a classic ASP website to an ASP.NET codebase. At the heart of the site is a MySQL database. To make sure an "in-process" program...
2
by: amirmira | last post by:
Hi, I have an application where I monitor the status of a machine using it's IP address. I would like to log an error when the machine goes down - but I want to add the name of the machine along...
6
by: Michael | last post by:
I am running an application that requires "Full Trust" which is declared in the assembly. How do I trap for the System.Security.Policy.PolicyException that is raised by a local machines CAS if...
5
by: Hooyoo | last post by:
Hi, here, How to get local machine name and IP address? Thanks.
3
by: Erjan | last post by:
Hi, I am using TcpClient to connect to a device which does not talk NetBios. The TcpClient tries first to do something with Netbios. This probably failes on a timeout and then TcpClient sets up...
6
by: belias | last post by:
So...here we go. I'm having an issue with one computer on a network not being able to ping other computers by name. I've spent the last day searching similar issues and I've tried all the steps...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.