python get registry infomation
来源:互联网 发布:网络攻击实时 编辑:程序博客网 时间:2024/06/07 02:44
MRAB schrieb:> Jorge wrote:>> I need to know how to get the hardware serial number of a hard disk in >> python.>>> For Windows, see http://www.daniweb.com/forums/thread187326.htmlThis recipe uses the function GetVolumeInformation(), which does notreturn the hardware serial number. From the microsoft documentation: This function returns the volume serial number that the operating system assigns when a hard disk is formatted. To programmatically obtain the hard disk's serial number that the manufacturer assigns, use the Windows Management Instrumentation (WMI) Win32_PhysicalMedia property SerialNumber.The WMI method is e.g. described here:http://www.velocityreviews.com/forums/t359670-wmi-help.htmlimport wmic = wmi.WMI()for pm in c.Win32_PhysicalMedia(): print pm.Tag, pm.SerialNumberor 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/pipermail/python-list/2002-August/735262.html
- python get registry infomation
- Get USB Infomation
- get the company infomation which we want to get
- Get https://registry-1.docker.io/v2/library/python/manifests/2.7http: TLS handshake timeout
- Get password hash from registry
- python registry path
- Infomation Technology
- SourceFile Infomation
- Registry
- Registry
- Registry
- Registry
- no python installation found in the registry
- Adding Python Information to the Windows Registry
- Failed to get the installation date from registry:Error solution
- Infomation Module Profile介绍
- Infomation Module Profile介绍
- flow infomation by jquery
- Android下使用Properties文件保存程序设置
- CENTOS的GIT安装及使用
- linux下安装smplayer软件包
- flex_菜单浅析;
- Linux 命令行技巧 大师的指点,着实不错
- python get registry infomation
- 一个异步加载图片的公用类: EGOImageLoading
- 指针
- 转 谷峰网:Android UI设计准则大全
- 如何与你的老大沟通
- IOCP简介
- java-去掉字符串前面的零
- 实习第一周总结(php+linux)
- 浅谈浮点数