Dietmar Schwertberger wrote:
The WMI method is e.g. described here:
http://www.velocityreviews.com/forums/t359670-wmi-help.html
import wmi
Not in the stdlib, but available here:
http://pypi.python.org/pypi/WMI/1.3
and requires in turn pywin32:
http://pypi.python.org/pypi/pywin32/210
c = wmi.WMI()
for pm in c.Win32_PhysicalMedia():
print pm.Tag, pm.SerialNumber
or to retrieve the serial number for the installation drive:
serial = c.Win32_PhysicalMedia(["SerialNumber"],
Tag=r"\\.\PHYSICALDRIVE0")[0].SerialNumber.strip()
Regards,
Dietmar
--
http://mail.python.org/mailman/listinfo/python-list