c: cd \fox\testing\hwinfo regsvr32 hwinfo.ocx exitThen I put the control in a form, and I got the info allright, alternatevily, if you have windows XP or 2003, you can use WMI with the following code:
? getLocalHDSerial(0) && Serial of the first HD, similar to HardDisk1SerialNumber in the HWInfo control function getLocalHDSerial(tnDevice) local loLocator, lcUser, lcPassword, lcDomain, loNetWork, lnDevice local loDrives, loDrive, lnCurrDevice, lcSerial lnDevice = Iif(Vartype(tnDevice) = 'N', tnDevice, 0) lcSerial = 'Unknown' try loWBEMLocator = createObject("wbemScripting.SwbemLocator") loWMIService = loWBEMLocator.ConnectServer() catch loWMIService = null endtry if not Isnull(loWMIService) loDrives = loWMIService.ExecQuery('Select SerialNumber from Win32_PhysicalMedia') lnCurrDevice = 0 for each loDrive in loDrives if lnCurrDevice = lnDevice lcSerial = loDrive.SerialNumber exit endif lnCurrDevice = lnCurrDevice + 1 endfor endif return Alltrim(lcSerial)