View Single Post
  #26  
Old March 18th 18, 03:20 PM posted to alt.comp.os.windows-10
GS
external usenet poster
 
Posts: 179
Default SSDs serial No in BIOS.

"GS" wrote

What I posted was the Win32_DiskDrive equivalent of
Garry's code. Win32_DiskDrive has a SerialNumber property.
What I posted was just the scripted, direct-from-WMI
version of your method. *It's all coming from the same
place.* (Note that DeviceID also returns a
unique value: The order of the disk as the system
sees it: disk 0, disk 1, etc.)


None of that matters if the return doesn't associate the serial# with its
respective drive, which Andy's cmd line approach doesn't do. See my last
reply for a better solution...


I'm not sure that's better. Peter seemed to
be saying that one disk was not mounted.


I didn't catch that since he's trying to retrieve the serial#s programmatically
suggests both are mounted. You could very well be right if the machine doesn't
have 2 SSD slots.

So it wouldn't have drive letters. Also,
DeviceID will show the order they're plugged
in. Presumably SATA0 will show as disk0.


The context of DeviceID in my use is to verify the DriveLetter of the drive
matches the value returned by InputBox. In LogicalDisk, both DeviceID and
Caption return the drive Path.

Personally, I still think a piece of tape on
one of them is a better method.

His actual question seemed to be theoretical
rather than practical. If he doesn't know which
disk is new and which is old when looking in
the case then a piece of tape will solve that.
Since he's cloning for replacement, he really
has no need to tell them apart from inside
Windows. He's not going to be running both.


--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
Ads