Solved

Need to get serial numbers from my Dell computers

Posted on 2006-06-21
6
1,080 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
  • 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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