function getSysInfo(){ var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer(".") ); //CPU 情報 var cpu = new Enumerator (service.ExecQuery("SELECT * FROM Win32_Processor")).item(); var cpuType=cpu.Name,hostName=cpu.SystemName ; //メモリ情報 varmemory = new Enumerator (service.ExecQuery("SELECT * FROM Win32_PhysicalMemory")); for (var mem=[],i=0;!memory.atEnd( );memory.moveNext()) mem[i ]={cap:memory.item().Capacity/1024/1024,speed:memory.item().Speed} //システム情報 var system =new Enumerator (service.ExecQuery("SELECT * FROM Win32_ComputerSystem")).item(); var physicMenCap=Math.ceil(system.TotalPhysicalMemory/1024/1024),curUser=system.UserName,cpuCount=system. NumberOfProcessors
function button1_onclick() {//cpu 情報 var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var property = service.ExecQuery("SELECT * FROM Win32_Processor"); var e = 新しい列挙子 (プロパティ); 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 Button2_onclick() {//CD-ROM 情報 var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var property = service.ExecQuery("SELECT * FROM Win32_CDROMDrive"); var e = 新しい列挙子 (プロパティ); 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 Button3_onclick() {//键盘情報 var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var property = service.ExecQuery("SELECT * FROM Win32_Keyboard"); var e = 新しい列挙子 (プロパティ); 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 Button4_onclick() {//メインパネル情報 var locator = new ActiveXObject ("WbemScripting.SWbemLocator"); var service = locator.ConnectServer("."); var property = service.ExecQuery("SELECT * FROM Win32_BaseBoard"); var e = 新しい列挙子 (プロパティ); document.write("
"); for (;!e.atEnd();e.moveNext ()) { var p = e.item (); document.write("