Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hard Disk serial number
Message
De
04/01/2006 13:09:44
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
 
À
04/01/2006 13:02:28
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 7
Divers
Thread ID:
01083011
Message ID:
01083240
Vues:
48
>>>>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
>
>On general for WMI:
>"The WMI Redistributable Components version 1.0 file, which requires Windows® 2000 Service Pack 2 or later, is available to download at http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdkredist.htm.
>
>WMI functionality introduced in the Windows 2000 SP 2 operating system is also available to earlier operating systems by downloading the Microsoft® .NET Framework SDK, and the .NET Framework Redistributable. These can be obtained at http://msdn.microsoft.com/netframework/downloads/howtoget.asp.
>
>
>Run-Time Requirements
>
>Applications that use WMI require Windows® Server 2003, Windows® XP, Windows® Millennium Edition (Me), Windows NT®, Windows® 2000, Windows® 98, or Windows® 95 operating systems. For information about which operating system is required to use a specific API element, see the Requirements section of each topic in the WMI documentation."
>
>win32_PhysicalMedia class:
>"Requirements
>Client: Requires Windows XP.
>Server: Requires Windows Server 2003.
>Header: Declared in Wmipcima.mof.
>Namespace: Included in \root\cimv2."
>
>You might instead try with another class.
>
>Cetin

Thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform