Where can I find the service tag in the registry?

We have Dell workstations. Occasionally we need to find the service tag for them in order to contact Dell and/or find suitable components. This tag is written in a label stuck to each computer, however I am wondering if this can also be found by looking for the service tag in the registry instead.

We use the Belarc analyser to give an overview of the hardware and software, and I notice that this report includes the service tag which suggests that it must be possible to determine it without looking at the label.
jpguillebaudAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pearl_export_benCommented:
Hey...

Unfortunately the Dell Service tag is stored in the BIOS, not the registry.

This piece of VB script will return the service tag of the current machine:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
Wscript.Echo "Serial Number: " & objSMBIOS.SerialNumber
Next 

Open in new window

0
jpguillebaudAuthor Commented:
I have found a much simpler way to do this. Simply enter the following command into the command prompt:

wmic bios get serialnumber
0
Pearl_export_benCommented:
Awesome.... Another option using VB Script... Save the below code to a VBS File:

on error resume next
strComputer=WScript.Arguments.Item(0)
Set objWMIservice = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
For each objitem in colitems
      Wscript.echo "Dell Service Tag: " & objitem.serialnumber
Next
'

Run the file like this:
cscript C:\folder\script.vbs MyComputerName

And it will return the value of a remote PC too.  Very useful if you are making calls about PC's other than your own on the network.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jpguillebaudAuthor Commented:
Thank you, very useful.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hardware

From novice to tech pro — start learning today.