Need to get serial numbers from my Dell computers

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
campomanesAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
grayeConnect With a Mentor Commented:
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
 
pml_sivaCommented:
0
 
campomanesAuthor Commented:
Hi,

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

Any ideas.  

Thank you.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
grayeCommented:
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
 
campomanesAuthor Commented:
Thank you so much.  Your code gets me serial number.

David
0
 
grayeCommented:
I botched the URL for the beta...

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

From novice to tech pro — start learning today.