javascript硬盘序列号+其它硬件信息_javascript技巧:看了看别的资料有提取CPU,MAC的现成代码却没有硬盘序列号,找了好久才找到提取硬盘序列号的参数。于是自己给补上了。 提取硬盘序列号 function disk() {//硬盘序列号 信息 var locator = new ActiveXObject (WbemScripting.
导读javascript硬盘序列号+其它硬件信息_javascript技巧:看了看别的资料有提取CPU,MAC的现成代码却没有硬盘序列号,找了好久才找到提取硬盘序列号的参数。于是自己给补上了。 提取硬盘序列号 function disk() {//硬盘序列号 信息 var locator = new ActiveXObject (WbemScripting.
function disk() {//硬盘序列号 信息 var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var properties = service.ExecQuery("SELECT * FROM Win32_DiskDrive"); var e = new Enumerator (properties); document.write("
"); for (;!e.atEnd();e.moveNext ()) { var p = e.item (); document.write("
function Button2_onclick() {//CPU 信息 var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var properties = service.ExecQuery("SELECT * FROM Win32_Processor"); var e = new Enumerator (properties); document.write("
"); for (;!e.atEnd();e.moveNext ()) { var p = e.item (); document.write("
"); document.write("
" + p.Caption + "
"); document.write("
" + p.DeviceID + "
"); document.write("
" + p.Name + "
"); document.write("
" + p.CpuStatus + "
"); document.write("
" + p.Availability + "
"); document.write("
" + p.Level + "
"); document.write("
" + p.ProcessorID + "
"); document.write("
" + p.SystemName + "
"); document.write("
" + p.ProcessorType + "
"); document.write("
"); } document.write("
"); }
function Button1_onclick() {//软盘信息 var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var properties = service.ExecQuery("SELECT * FROM Win32_FloppyDrive"); var e = new Enumerator (properties); document.write("
"); for (;!e.atEnd();e.moveNext ()) { var p = e.item (); document.write("
"); document.write("
" + p.Description + "
"); document.write("
" + p.DeviceID + "
"); document.write("
" + p.Status + "
"); document.write("
" + p.Manufacuturer + "
"); document.write("
"); } document.write("
"); }
function Button1_onclick() {//CD-ROM 信息 var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var properties = service.ExecQuery("SELECT * FROM Win32_CDROMDrive"); var e = new Enumerator (properties); document.write("
"); for (;!e.atEnd();e.moveNext ()) { var p = e.item (); document.write("
"); document.write("
" + p.Caption + "
"); document.write("
" + p.Description + "
"); document.write("
" + p.Drive + "
"); document.write("
" + p.Status + "
"); document.write("
" + p.MediaLoaded + "
"); document.write("
"); } document.write("
"); }
function Button1_onclick() {//键盘信息 var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var properties = service.ExecQuery("SELECT * FROM Win32_Keyboard"); var e = new Enumerator (properties); document.write("
"); for (;!e.atEnd();e.moveNext ()) { var p = e.item (); document.write("
"); document.write("
" + p.Description + "
"); document.write("
" + p.Name + "
"); document.write("
" + p.Status + "
"); document.write("
"); } document.write("
"); }
function Button1_onclick() {//主板信息 var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var properties = service.ExecQuery("SELECT * FROM Win32_BaseBoard"); var e = new Enumerator (properties); document.write("
"); for (;!e.atEnd();e.moveNext ()) { var p = e.item (); document.write("
在这上找到了硬盘序列号的参数: \'获得硬盘序列号 Dim cmicWmi As New System.Management.ManagementObjectSearcher(\"SELECT * FROM Win32_DiskDrive\") Dim Uint32 As UInt32 For Each cmicWmiObj As ManagementObject In cmicWmi.Get Uint32 = cmicWmiObj(\"signature\") Next TextBox1.Text = Uint32.ToString 和在一块总算给提出来了,呵呵。
javascript硬盘序列号+其它硬件信息_javascript技巧
javascript硬盘序列号+其它硬件信息_javascript技巧:看了看别的资料有提取CPU,MAC的现成代码却没有硬盘序列号,找了好久才找到提取硬盘序列号的参数。于是自己给补上了。 提取硬盘序列号 function disk() {//硬盘序列号 信息 var locator = new ActiveXObject (WbemScripting.