Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Low Level Hard Drive Information

Status
Not open for further replies.

Bitaoo

Programmer
Dec 18, 2002
81
US
Hello,

I have a question and hope you can help me. I want
know how I can get the Low Level Hard Drive Information?

Low Level Hard Drive Information: This refers to the
master hard drive serial number in hardware. Note that
this is not the drive serial number which can be set
from software. The hardware level serial number can
only be set during the manufacturing process.

Thanks,
--Bita
 
Function DriveSerialNumber(drvPath)
Dim fs, d
Set fs = CreateObject("Scripting.FileSystemObject")
Set d = fs.GetDrive(fs.GetDriveName(drvPath))
DriveSerialNumber = d.SerialNumber
End Function

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 
Thanks Ronald for your response, but it doesn't get the
MASTER hard drive serial number.

--Bita
 
The file system object exposes a bunch of interesting things such as a drives collection, subfolder collections and files collections (eg the information available in VB with the Drives, Files and Dir listbox controls).

To access it, set a reference to Microsoft Scripting Runtime (scrrun.dll) and then hit F2 to use the Object Browser.

RDodge, nice, compact code example!

Good Luck!

Have a great day!

j2consulting@yahoo.com
 
There may be an API that returns the information you are seeking. Try posting your question on the Visual Basic(Microsoft) Win32API Forum forum711.

Good Luck!

Have a great day!

j2consulting@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top