Question

Hard Drive info VBS using Win32_DiskDrive - what is "Signature" ?

Asked by: BillDL

Hi Experts

I'm not terribly well acquainted with either VB Scripting or WMI, but I participated recently in another question about creating backups on an external usb hard drive using "DOS" batch and xcopy, and the subject came around logically to performing some checks to ensure that the drive letter was assigned to the correct drive.  The suggestions were to use the Volume Label for the check, but it got me thinking about the Manufacturer's Serial Number as an even more accurate check.

There is the Volume Serial number of drives, which is assigned by the operating system, but that wouldn't be applicable if the drive was connected to another PC, but the manufacturer's serial number for the hard drive would remain static if it can be retrieved.

I discovered a couple of VB scripts that use the "Win32_DiskDrive" class and retrieve the "Signature" value for drives.  I am wondering what this value actually is.

Here's the details I have gathered in respect of my two internal IDE hard drives and my external USB hard drive using Windows commands, AIDA32 (now Everest), Belarc Advisor, and the VBS file in the code snippet.

Seagate (C:) One Partition - System Drive.
WMI Signature: 281022655 <-------------------------------- **
Aida32 and Belarc Model ID: ST340016A
Aida32 and Belarc Serial No: 3HS96FM0
Volume Label: CCB6-7A61 (or CCB77A61 MSINFO32)

Maxtor (D: NTFS and E: FAT32)
WMI Signature: -1297841220 <----------------------------- **
Aida32 and Belarc Model ID: Maxtor 6L160P0
Aida32 and Belarc Serial No: L41C7NTH
Volume Serial D: 7C77-844F (or 7C77844F MSINFO32)
Volume Label D: XP_NTFS
Volume Serial E: 0B66-1ED8 (or 0B661ED8 MSINFO32)
Volume Label E: STORAGE

Freecom USB (I: J: K:) 3 Partitions all FAT32
WMI Signature: 50627703 <----------------------------- **
NirSoft USBDeview Serial No: DEF10B39A73D
NirSoft USBDeview Device Name: Classic SL Hard Drive
Model ID: Freecom HDS72808 0PLAT20
Volume Serial I: 9451-248B (or 9451248B MSINFO32)
Volume Label I: FREECOM1
Volume Serial J: D827-A03B (or D827A03B MSINFO32)
Volume Label J: FREECOM2

Can someone tell me what Signature is, and where it is retrieved from?

Thank you
Bill

VBS file below.  I'm running this in Windows XP SP3.

On Error Resume Next
 
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
 
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_DiskDrive", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)
 
For Each objItem In colItems
    WScript.Echo "Caption: " & objItem.Caption
    'WScript.Echo "Model: " & objItem.Model
    WScript.Echo "MediaType: " & objItem.MediaType
    WScript.Echo "Manufacturer: " & objItem.Manufacturer
    WScript.Echo "MediaLoaded: " & objItem.MediaLoaded
    WScript.Echo "InterfaceType: " & objItem.InterfaceType
    WScript.Echo "Description: " & objItem.Description
    WScript.Echo "DeviceID: " & objItem.DeviceID
    WScript.Echo "Name: " & objItem.Name
    WScript.Echo "Index: " & objItem.Index
    WScript.Echo "Partitions: " & objItem.Partitions
    WScript.Echo "Status: " & objItem.Status
    WScript.Echo "Signature: " & objItem.Signature
    WScript.Echo
Next

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-04 at 11:49:27ID24783880
Tags

VB Script

,

WMI

,

objItem.Signature

,

Windows XP

,

Hard Drive

,

USB Drive

Topics

Windows Management Instrumentation (WMI)

,

Computer Hard Drives

,

Visual Basic Programming

Participating Experts
1
Points
500
Comments
9

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Terrible problem!
    I'm experiencing a terrible problem at my home computer. For example: I start using Netscape, it's fast... Then a few clicks later, it starts to get slower and slower, disk activity starts like mad, up to the point when it renders the machine almost inopperable, then I have t...
  2. Correct switches for xcopy in Windows 98
    What are the correct switches that should be used to transfer the boot drive to a new HDD in Windows 98. Also, will this copy itself or should I use xcopy from a separate boot disK (CD or floppy)?
  3. XCOPY in Windows XP
    In my office , I use the following command to transfer everything from one harddisk to another (must be bootable) harddisk and the OS is WIN98SE. XCOPY C:\*.* /E /C /R /H /Y /K Shall I use the same command if OS is WinXP. If there are other solutions, please suggest.
  4. Partition Signature !=55AA
    Hi Everyone: I have installed a HDD recently purchased with a 30 day warranty. I used FDisk to set it Active and restarted the pc. Now, I got a message indicating parition signature !=55AA. What can I do to get it to boot to the DOS prompt? George
  5. Xcopy
    Can Anyone tell me the old way of copying data HDD to HDD without ghost??? Xcopy command if I remember rightly

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: BillDLPosted on 2009-10-04 at 11:53:32ID: 25490207

By the way, there is no great urgency to this question.  It is really just so I know if this value is a constant that could be used for drive identification or not.  The points value is high because I am sure that I will receive answers that go way over my head and I will have to ask to have them explained in simple language ;-)

 

by: greenhacksPosted on 2009-10-04 at 12:00:47ID: 25490253

 

by: greenhacksPosted on 2009-10-04 at 12:01:27ID: 25490260

http://msdn.microsoft.com/en-us/library/aa394132(VS.85).aspx

Signature
Data type: uint32
Access type: Read-only

Disk identification. This property can be used to identify a shared resource. This property has been added for Windows XP.

 

by: BillDLPosted on 2009-10-04 at 12:54:38ID: 25490575

Thank you greenhacks.

I had been searching the MSDN libraries before I asked, but it's such a maze.  I found that by turning it to low bandwidth view it makes things a bit easier to read, but it is still a rabbit warren.  To be very honest, I really didn't trust or understand the explanations I had read in some other non-Microsoft pages, and I couldn't find this topic having been previously asked in Experts-Exchange before.  In general, any pages returned in my searches just gave me the details you posted.

OK, so it's a 32-bit unsigned integer.  That part I understand, as do I understand that the value is a Read-Only one.  What I am not clear about is exactly what was being asked about in your first linked page.  There doesn't seem to be a properly qualified answer there to the question of what happens if the OS is reinstalled, or if the drive is connected to another computer.  The explanation is based on a "it is my understanding" basis.

In that first linked page Mohammadreza asks precisely what I am seeking to find out:
"What if the user reinstalls the OS?  Does the OS generate the same signature?"

Unfortunately Mischa responds there with a vague and ambiguous answer:
"In my understanding the signature is never touched again if generated before."

So where is the number generated then?
I thought the value retrieved by WMI is Read-Only, but the answer tends to imply that the number is "generated, presumably TO the hard drive, but it's Read-Only and can't be.

Is this integer a value generated from a combination of other values, something along the lines of the "hash" number created for Windows Activation, except that it will always be the same if connected to any computer that supports reading and hashing the values into a signature?

Sorry for the questions, but the two links don't really explain what I needed to know.

Thanks
Bill

 

by: greenhacksPosted on 2009-10-04 at 13:05:40ID: 25490644

Well once generated and stored on hdd itself, it will be readonly for us and not for windows i think.

And here is on how it is created:
Signature:
http://msdn.microsoft.com/en-us/library/aa371795(VS.85).aspx

Also read not in RED color which says:
[The Signature property is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use the DiskSignature property.]

DiskSignature:
http://msdn.microsoft.com/en-us/library/bb309233(VS.85).aspx


Does that answer your question?

 

by: BillDLPosted on 2009-10-04 at 13:24:02ID: 25490754

Thank you greenhacks.  I'll need to look at this later.  Just getting ready for work (nightshift).  Be back later :-)

 

by: greenhacksPosted on 2009-10-04 at 13:33:11ID: 25490801

Ok sure.

 

by: BillDLPosted on 2009-10-05 at 07:05:02ID: 25495308

Thank you greenhacks.  I have a fuller understanding of this now and can therefore eliminate it as a useful method for drive identification as far as the other question is concerned.

 

by: BillDLPosted on 2009-10-05 at 07:06:39ID: 31636948

Well selected links that took me straight to the explanations after having chased my tail for quite a while trying to find the info I needed.  Thanks.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...