Get Hard disk serial Number

Hm, looking at your first set of code, I think you have retrieved (maybe?) the hard drive model. The serial # comes from Win32_PhysicalMedia. Get Hard Drive model ManagementObjectSearcher searcher = new ManagementObjectSearcher(“SELECT * FROM Win32_DiskDrive”); foreach(ManagementObject wmi_HD in searcher.Get()) { HardDrive hd = new HardDrive(); hd.Model = wmi_HD[“Model”].ToString(); hd.Type = wmi_HD[“InterfaceType”].ToString(); hdCollection.Add(hd); } Get … Read more

Python causing: IOError: [Errno 28] No space left on device: ‘../results/32766.html’ on disk with lots of space

The ENOSPC (“No space left on device”) error will be triggered in any situation in which the data or the metadata associated with an I/O operation can’t be written down anywhere because of lack of space. This doesn’t always mean disk space – it could mean physical disk space, logical space (e.g. maximum file length), … Read more

How to list physical disks?

#WMIC wmic is a very complete tool wmic diskdrive list provide a (too much) detailed list, for instance for less info wmic diskdrive list brief #C Sebastian Godelet mentions in the comments: In C: system(“wmic diskdrive list”); As commented, you can also call the WinAPI, but… as shown in “How to obtain data from WMI … Read more