mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-27 23:55:54 -05:00
Merge pull request #5392 from Ylianst/bios-serial
add bios serial for windows
This commit is contained in:
commit
e1b435fb0c
@ -1825,6 +1825,15 @@ function getSystemInformation(func) {
|
|||||||
if (results.hardware.windows.osinfo) { delete results.hardware.windows.osinfo.Node; }
|
if (results.hardware.windows.osinfo) { delete results.hardware.windows.osinfo.Node; }
|
||||||
if (results.hardware.windows.partitions) { for (var i in results.hardware.windows.partitions) { delete results.hardware.windows.partitions[i].Node; } }
|
if (results.hardware.windows.partitions) { for (var i in results.hardware.windows.partitions) { delete results.hardware.windows.partitions[i].Node; } }
|
||||||
} catch (ex) { }
|
} catch (ex) { }
|
||||||
|
try {
|
||||||
|
var values = require('win-wmi').query('ROOT\\CIMV2', "SELECT * FROM Win32_Bios", ['SerialNumber']);
|
||||||
|
results.hardware.identifiers['bios_serial'] = values[0]['SerialNumber'];
|
||||||
|
} catch (ex) { }
|
||||||
|
}
|
||||||
|
if(results.hardware && results.hardware.linux) {
|
||||||
|
if (require('fs').statSync('/sys/class/dmi/id/product_serial').isFile()){
|
||||||
|
results.hardware.identifiers['bios_serial'] = require('fs').readFileSync('/sys/class/dmi/id/product_serial').toString().trim();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
results.hardware.agentvers = process.versions;
|
results.hardware.agentvers = process.versions;
|
||||||
replaceSpacesWithUnderscoresRec(results);
|
replaceSpacesWithUnderscoresRec(results);
|
||||||
|
@ -5970,6 +5970,7 @@
|
|||||||
// BIOS
|
// BIOS
|
||||||
if (ident.bios_vendor) { x += addDetailItem("Vendor", EscapeHtml(ident.bios_vendor), s); }
|
if (ident.bios_vendor) { x += addDetailItem("Vendor", EscapeHtml(ident.bios_vendor), s); }
|
||||||
if (ident.bios_version) { x += addDetailItem("Version", EscapeHtml(ident.bios_version), s); }
|
if (ident.bios_version) { x += addDetailItem("Version", EscapeHtml(ident.bios_version), s); }
|
||||||
|
if (ident.bios_serial) { x += addDetailItem("Serial", EscapeHtml(ident.bios_serial), s); }
|
||||||
if (x != '') { sections.push({ name: "BIOS", html: x, img: 'chip' }); }
|
if (x != '') { sections.push({ name: "BIOS", html: x, img: 'chip' }); }
|
||||||
|
|
||||||
// Motherboard
|
// Motherboard
|
||||||
|
@ -11665,6 +11665,7 @@
|
|||||||
// BIOS
|
// BIOS
|
||||||
if (ident.bios_vendor) { x += addDetailItem("Vendor", EscapeHtml(ident.bios_vendor), s); }
|
if (ident.bios_vendor) { x += addDetailItem("Vendor", EscapeHtml(ident.bios_vendor), s); }
|
||||||
if (ident.bios_version) { x += addDetailItem("Version", EscapeHtml(ident.bios_version), s); }
|
if (ident.bios_version) { x += addDetailItem("Version", EscapeHtml(ident.bios_version), s); }
|
||||||
|
if (ident.bios_serial) { x += addDetailItem("Serial", EscapeHtml(ident.bios_serial), s); }
|
||||||
if (x != '') { sections.push({ name: "BIOS", html: x, img: 'chip64.png' }); }
|
if (x != '') { sections.push({ name: "BIOS", html: x, img: 'chip64.png' }); }
|
||||||
|
|
||||||
// Motherboard
|
// Motherboard
|
||||||
|
Loading…
Reference in New Issue
Block a user