[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Need to get serial numbers from my Dell computers

Posted on 2006-06-21
6
Medium Priority
?
1,086 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 2000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

649 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