473,385 Members | 1,606 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,385 software developers and data experts.

How do you search by a Serial Number and return a Computer name on a network?

anoble1
245 128KB
hi,

I was wondering if their was a way to search for computers on the network by seaching by a Serial Number.
Why? I have people calling me with a serial number and wanting to know what the PC Name is and who was on it last.

Right now, all I can do is search by PC Name and return the serial (not the other way around)

Any Help?

Expand|Select|Wrap|Line Numbers
  1. MyHostName = InputBox ("Enter Machine Name")
  2. Set objWMIService = GetObject("winmgmts:" _
  3.             & "{impersonationLevel=impersonate}!\\" & MyHostName & "\root\cimv2")
  4. Set colSMBIOS = objWMIService.ExecQuery _
  5.             ("Select * from Win32_SystemEnclosure")
  6.   For Each objSMBIOS in colSMBIOS            
  7.     pn = "Part Number: " & objSMBIOS.PartNumber
  8.     sn = "Serial Number: " & objSMBIOS.SerialNumber
  9.     sn1 =  objSMBIOS.SerialNumber
  10.     an = "Asset Tag: " & objSMBIOS.SMBIOSAssetTag
  11.   Next
  12.  
  13. tmp = InputBox (pn & VBCrLf & sn  & VBCrLf & an,"Computer Serial Number",sn1)
Wondering if this code can be edited and be turned around?
Jul 3 '13 #1
1 3393
Rabbit
12,516 Expert Mod 8TB
You can't do it the other way around because computers are located by MAC addresses and IP addresses. You will just need to run that against every computer to find out which serial it's using until you find the right one. That could take a while. It may be better to just run it every so often and have it create a directory mapping IP's to its serial number and do a lookup against that. This of course could result in some minor discrepancies.
Jul 3 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: tom | last post by:
Hi, How do I get the serial number of the harddisk in .NET? I want this to be the same number even if the user has reformatted, so I do not want the volume serial number. Thanx, t
79
by: Klaus Bonadt | last post by:
In order to protect software from being copied without licence, I would like to use something like a key, which fits only to the current system. The serial number of the CPU or the current...
3
by: Mark Harris | last post by:
I have an installer which uses a Customer Information page in it, is there an easy way to pass the serial number entered to a custom action? If not, where would i find the serial number in the...
3
by: Jefe | last post by:
Hi group I'm trying to implement a console application which work just lie "Dir" instruction in MS-Dos prompt window so I need to display Volume Serial Number and also the free space, how can I...
10
by: Terry Olsen | last post by:
Does anyone know how to retrieve the system serial number? I'm writing an auditing program and need to grab that little bit of info. Thanks!
14
by: Lauren Wilson | last post by:
Discovered this interesting comment on MSDN: "To programmatically obtain the hard disk's serial number that the manufacturer assigns, use the Windows Management Instrumentation (WMI)...
6
by: Paul Bromley | last post by:
Ok - I have given up on trying to find the active IP address for a given PC. For licensing purposes I need to retrive a unique identifier from the PC that the program is installed on. The Hard disk...
8
by: Paul Bromley | last post by:
Thanks for your tolerance on this list. I asked the question regarding Commercial Copy Protection along with Unique PC Idnetifier and obtaining the active IP address. This was all to identify and...
7
by: Adele le Roux | last post by:
Hi All, How can I get the hard disk serial number of a remote computer's C:? The drive will NOT be mapped as a network drive. Thanks, Adele
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.