Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hard Disk serial number
Message
From
04/01/2006 12:52:29
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
 
To
04/01/2006 05:09:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 7
Miscellaneous
Thread ID:
01083011
Message ID:
01083220
Views:
25
>>Hi
>>I am developing a software in VFP for which i need the serial number of the hard disk. I don't want the Volume Number of the drive (ie c: , d: etc) as according to my information, this volume number changes whenever that volume is formatted. Can anybody help in getting the Hard Disk serial number which is manufacturer defined and which will not change.
>> Can anyone please tell me the VFP or API function to obtain disk serial number.
>>
>> thanks in advance
>>
>>Regards,
>>Somesh
>
>
>loWMI = GetObject("winmgmts:\\.\root\cimv2")
>oItems = loWMI.ExecQuery("select * from Win32_PhysicalMedia")
>
>For each oItem in oItems
> ? oItem.Tag, oItem.SerialNumber
>endfor
>
Cetin

Dear Cetin,
When i run this code i get this error :library not registered.
I have VFP7 and WIN98SE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform