Solved

Need to get serial numbers from my Dell computers

Posted on 2006-06-21
6
1,084 Views
Last Modified: 2008-01-09
I have over 100 computers and I need to get their serial numbers.  These computers are Dell ones. How can I do this?

Thank you.

David
0
Comment
Question by:campomanes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:pml_siva
ID: 16957593
0
 
LVL 41

Accepted Solution

by:
graye earned 500 total points
ID: 16959427
pml_siva's suggestion is a good one... I'd also recommend that you use Windows Management Instrumentation (WMI) to obtain the serial number/service tag number.

Here is an example, to demonstrate the concepts.

using System;
using System.Management;
using System.Windows.Forms;

namespace WMISample
{
    public class MyWMIQuery
    {
        public static void Main()
        {
            try
            {
                ManagementObjectSearcher searcher =
                    new ManagementObjectSearcher("root\\CIMV2",
                    "SELECT * FROM Win32_ComputerSystemProduct");

                foreach (ManagementObject queryObj in searcher.Get())
                {
                    Console.WriteLine("-----------------------------------");
                    Console.WriteLine("Win32_ComputerSystemProduct instance");
                    Console.WriteLine("-----------------------------------");
                    Console.WriteLine("IdentifyingNumber: {0}", queryObj["IdentifyingNumber"]);
                    Console.WriteLine("UUID: {0}", queryObj["UUID"]);
                    Console.WriteLine("Vendor: {0}", queryObj["Vendor"]);
                    Console.WriteLine("Version: {0}", queryObj["Version"]);
                }
            }
            catch (ManagementException e)
            {
                MessageBox.Show("An error occurred while querying for WMI data: " + e.Message);
            }
        }
    }
}

If you're interested in looking at the source code to a complete solution, take a look at the SOSOS project's VB.Net source code at:  http://home.hot.rr.com/graye/Temp/SOSOSv3_Beta

It might a bit of overkill, (and it's in VB.Net) but feel free to plagerize any/all of the code.
0
 

Author Comment

by:campomanes
ID: 16965273
Hi,

I just ran the above code, but it gave me an error:  MessageBox. doesn't exist.

Any ideas.  

Thank you.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 41

Expert Comment

by:graye
ID: 16970507
The sample above is a for console application...

If you're interested in a complete solution, you might wanna take a look at the SOSOS project.  It's a free application for gathering ~200 pieces of information from computers on a LAN.  It can be run locally or it can be used the scan the network.  It's available as VB.Net source code.

Yeah, sure...it's probably overkill for what you're asking for, but on the other hand, once you get hooked on gathering information about your PCs, you might not be able to stop!

Here is an article from http://home.hot.rr.com/graye/Articles/SOSOS.htm
SOSOS version 3.0 Beta is now available at http://home.hot.rr.com/Temp/SOSOSv3_Beta
0
 

Author Comment

by:campomanes
ID: 16976625
Thank you so much.  Your code gets me serial number.

David
0
 
LVL 41

Expert Comment

by:graye
ID: 16979036
I botched the URL for the beta...

http://home.hot.rr.com/graye/Temp/SOSOSv3_Beta
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question