通过WMI来实现获取客户端计算机硬件及系统信息:
1//系统信息获取
2function getSysInfo(){
3 var locator = new ActiveXObject ("WbemScripting.SWbemLocator");
4 var service = locator.ConnectServer(".");
5 //CPU信息
6 var cpu = new Enumerator (service.ExecQuery("SELECT * FROM Win32_Processor")).item();
7 var cpuType=cpu.Name,hostName=cpu.SystemName;
8 //内存信息
9 var memory = new Enumerator (service.ExecQuery("SELECT * FROM Win32_PhysicalMemory"));
10 for (var mem=[],i=0; !memory.atEnd(); memory.moveNext()) mem[...
[ 查看全文 ]