mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	add bios serial for windows
Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
		
							parent
							
								
									6d27ff5969
								
							
						
					
					
						commit
						14c3816fc9
					
				
					 3 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -1825,6 +1825,10 @@ 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) { }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        results.hardware.agentvers = process.versions;
 | 
					        results.hardware.agentvers = process.versions;
 | 
				
			||||||
        replaceSpacesWithUnderscoresRec(results);
 | 
					        replaceSpacesWithUnderscoresRec(results);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5969,6 +5969,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
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11654,6 +11654,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…
	
	Add table
		Add a link
		
	
		Reference in a new issue