获取制造商通过PHP提供的硬盘驱动器序列号 [英] Getting Serial Number of the Hard Drive Provided by the manufacturer through PHP

查看:149
本文介绍了获取制造商通过PHP提供的硬盘驱动器序列号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

获取硬盘驱动器的序列号 由制造商通过PHP提供: 怎么做到呢? 我想将其存储在文件中.

Getting Serial Number of the Hard Drive Provided by the manufacturer through PHP : How can it be done? I want to store it in a file.

OS:Windows 2000,XP,ME,Vista ...

OS : windows 2000,XP,ME,Vista...

是的,我想要服务器的硬盘驱动器 的序列号.

Yes, I want the serial number of the hard drive of the Server.

还是可以通过Adobe AIR完成? 还是可以通过Windows上的C程序来完成?

Or can it be done through Adobe AIR? Or can it be done through a C program on Windows?

C:\Documents and Settings\Administrator>dir
 Volume in drive C has no label.
 Volume Serial Number is BC16-5D5F

这个数字:BC16-5d5f对于硬盘驱动器是唯一的吗? 与制造商给定的序列号有何不同?

Is this number : BC16-5d5f unique for a hard drive? How is it different from the manufacturer given serial number?

wmic DISKDRIVE GET SerialNumber

在我的Vista计算机上仅显示以下文本:

Displays only the following text on my Vista Machine:

序列号

在我的XP计算机上,该命令无法识别.

On my XP machine, the command is unrecognized.

推荐答案

以下内容返回磁盘序列号.应该与多个驱动器一起使用,您将获得多个结果.只需使用 shell_exec 来运行它.

The following returns the disk serial number. Should work with multiple drives, you'll just get multiple results. Just run it with shell_exec.

wmic DISKDRIVE GET SerialNumber

wmic.exe位于Windows system32文件夹中. wmic确实存在于WinXP上,我自己在那儿用过.

wmic.exe is located in your windows system32 folder. And wmic does exist on WinXP, Ive used it there myself.

我在Vista上的结果:

My result on Vista:

C:\Windows\System32>wmic DISKDRIVE GET SerialNumber
SerialNumber
20202020202054534241354c4*snip*

我不知道所有的硬盘驱动器是否都向操作系统提供了序列号.

I do not know if all harddrives provides the serial number to the OS.

似乎wmic命令仅在Windows XP,Windows Vista和Windows 7的专业版本上可用.

It seems the wmic command is only available on the professional versions of Windows XP, Windows Vista and Windows 7.

这篇关于获取制造商通过PHP提供的硬盘驱动器序列号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆