add bios serial for windows

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith 2023-10-04 18:51:02 +00:00
parent 6d27ff5969
commit 14c3816fc9
3 changed files with 6 additions and 0 deletions

View File

@ -1825,6 +1825,10 @@ function getSystemInformation(func) {
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; } }
} 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) { }
}
results.hardware.agentvers = process.versions;
replaceSpacesWithUnderscoresRec(results);

View File

@ -5969,6 +5969,7 @@
// BIOS
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_serial) { x += addDetailItem("Serial", EscapeHtml(ident.bios_serial), s); }
if (x != '') { sections.push({ name: "BIOS", html: x, img: 'chip' }); }
// Motherboard

View File

@ -11654,6 +11654,7 @@
// BIOS
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_serial) { x += addDetailItem("Serial", EscapeHtml(ident.bios_serial), s); }
if (x != '') { sections.push({ name: "BIOS", html: x, img: 'chip64.png' }); }
// Motherboard