473,718 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("W Script.NetWork" )
strLocalName = objNet.Computer Name

strLocalName always gives me the name of the intranet server,
(basically the same results as using
Request.ServerV ariables("SERVE R_NAME").

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

sOStype = oShell.RegRead( "HKLM\SOFTWARE\ Microsoft\Windo ws
NT\CurrentVersi on\ProductName" )
sOSVersion = oShell.RegRead( "HKLM\SOFTWARE\ Microsoft\Windo ws
NT\CurrentVersi on\CSDVersion")
sOSBuild = oShell.RegRead( "HKLM\SOFTWARE\ Microsoft\Windo ws
NT\CurrentVersi on\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 3931
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("W Script.NetWork" )
strLocalName = objNet.Computer Name

strLocalName always gives me the name of the intranet server,
(basically the same results as using
Request.ServerV ariables("SERVE R_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.serverv ariables
for each key in vars
response.write key & ": " & vars(key) & "<br>"
next
%>

See "HTTP_USER_AGEN T"? You can get that directly by:

dim agent
agent = Request.serverv ariables("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++fro m+%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
5714
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. However, I can't find a way to create a new website in XP Professional, only subwebs. Also, I can't seem to get https to work with the IIS on my laptop too. I tried giving my machine a static IP, but that did not work. How do you do this?
2
1655
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 installed a certificate from our domain CA on the single web site allowed in IIS 5.1. I've successfully installed certs on our qa and prod sites from our domain CA too. Everything works fine on both of those sites (yes, I am using a non trusted domain...
4
3646
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
4150
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 doesn't screw up the live site, I run a local IIS webserver on my XP Pro (AMD XP 2500+, 512MB DDR RAM) machine, which resides behind an XP ICS gateway on my LAN. I also have a MySQL server set up locally for development purposes.
2
2406
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 with the IP address in the log. Any ideas how to achieve this? I have seen several examples of obtaining the IP address given the host name using the dns.gethostbyname function but have not seen anything that will work the other way. Thanks in...
6
1913
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 its current policy will not allow "Full Trust", ie its running in the Intranet Zone. I am trying to trap the error to advise users to have adm revise policy to permit running the program otherwise a cryptic debug screen is raised.
5
72352
by: Hooyoo | last post by:
Hi, here, How to get local machine name and IP address? Thanks.
3
2409
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 the TCP connection. Due to this it takes about 5 secons to set up a TCP connection on a LAN. Is it possible to disable the NetBios request ? I have rewritten the program with sockets but also sockets try to
6
4205
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 recommended. If anyone has some suggestions, I'd love to give them a try - this is driving me nuts!! I am connected via wired-LAN to a Linksys WRT-600N router; there are 4 other computers on the network. The other 3 computers are working perfectly...
0
8827
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9352
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9206
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9052
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7985
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6652
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4481
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4740
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.