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

"Andy Burns" wrote

In any case....
What you're doing is the same thing as what Garry
is doing. He's using WMI via script. You're using a WMI
wrapper applet for command line. Both are using WMI.


No, not the same ... mine is retrieving the physical disc's serial
number set in the facctory, which should correspond to the serial number
printed on the disk itself;


Please reread. What I'm saying is that you are both
using WMI. You may not know it, but wmic is just
a wrapper around WMI. In other words, both methods
can be used. Garry was just retrieving different info
from what you were retrieving:

Win32_LogicialDisk vs Win32_DiskDrive

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...

--
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