From 7141e7f3b87afffb75d130b0c69822358a184bee Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 30 Oct 2018 13:01:44 -0700 Subject: [PATCH] Fixed SMBios fetching problems on some systems. --- agents/modules_meshcmd/smbios.js | 42 ++++++++++++++++++++++++++----- agents/modules_meshcore/smbios.js | 42 ++++++++++++++++++++++++++----- package.json | 2 +- views/default.handlebars | 7 ++++++ 4 files changed, 80 insertions(+), 13 deletions(-) diff --git a/agents/modules_meshcmd/smbios.js b/agents/modules_meshcmd/smbios.js index 61153a58..0770e4ff 100644 --- a/agents/modules_meshcmd/smbios.js +++ b/agents/modules_meshcmd/smbios.js @@ -143,15 +143,45 @@ function SMBiosTables() }); return; } - throw (process.platform + ' not supported'); + if (callback) { callback.apply(this, [null]); return; } else { return (null); } }; this.parse = function parse(data) { var r = {}; - r.processorInfo = this.processorInfo(data); - r.memoryInfo = this.memoryInfo(data); - r.systemInfo = this.systemInfo(data); - r.systemSlots = this.systemInfo(data); - r.amtInfo = this.amtInfo(data); + try + { + r.processorInfo = this.processorInfo(data); + } + catch(e) + { + } + try + { + r.memoryInfo = this.memoryInfo(data); + } + catch(e) + { + } + try + { + r.systemInfo = this.systemInfo(data); + } + catch(e) + { + } + try + { + r.systemSlots = this.systemInfo(data); + } + catch(e) + { + } + try + { + r.amtInfo = this.amtInfo(data); + } + catch(e) + { + } return r; } this.processorInfo = function processorInfo(data) { diff --git a/agents/modules_meshcore/smbios.js b/agents/modules_meshcore/smbios.js index 61153a58..0770e4ff 100644 --- a/agents/modules_meshcore/smbios.js +++ b/agents/modules_meshcore/smbios.js @@ -143,15 +143,45 @@ function SMBiosTables() }); return; } - throw (process.platform + ' not supported'); + if (callback) { callback.apply(this, [null]); return; } else { return (null); } }; this.parse = function parse(data) { var r = {}; - r.processorInfo = this.processorInfo(data); - r.memoryInfo = this.memoryInfo(data); - r.systemInfo = this.systemInfo(data); - r.systemSlots = this.systemInfo(data); - r.amtInfo = this.amtInfo(data); + try + { + r.processorInfo = this.processorInfo(data); + } + catch(e) + { + } + try + { + r.memoryInfo = this.memoryInfo(data); + } + catch(e) + { + } + try + { + r.systemInfo = this.systemInfo(data); + } + catch(e) + { + } + try + { + r.systemSlots = this.systemInfo(data); + } + catch(e) + { + } + try + { + r.amtInfo = this.amtInfo(data); + } + catch(e) + { + } return r; } this.processorInfo = function processorInfo(data) { diff --git a/package.json b/package.json index e99d152f..b189f47c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.2.2-l", + "version": "0.2.2-n", "keywords": [ "Remote Management", "Intel AMT", diff --git a/views/default.handlebars b/views/default.handlebars index 01f1bc4c..e59e62a6 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -458,6 +458,7 @@ + @@ -3972,6 +3973,12 @@ } else { desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,0x5B], [desktop.m.KeyAction.EXUP,0x5B]]); // MeshAgent: L-Winkey press, L-Winkey release } + } else if (ks == 6) { // WIN+R + if (desktop.contype == 2) { + desktop.m.sendkey([[0xffe7, 1], [0x72, 1], [0x72, 0], [0xffe7, 0]]); // Intel AMT: Meta-left down, 'l' press, 'l' release, Meta-left release + } else { + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 0x5B], [desktop.m.KeyAction.DOWN, 82], [desktop.m.KeyAction.UP, 82], [desktop.m.KeyAction.EXUP, 0x5B]]); // MeshAgent: L-Winkey press, 'R' press, 'R' release, L-Winkey release + } } }