1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-06 00:13:33 +00:00

fix win7+server2008r2 support again

This commit is contained in:
si458
2025-03-06 21:37:17 +00:00
parent 1579eba11d
commit 604f24ce11
4 changed files with 8 additions and 5 deletions

Binary file not shown.

View File

@@ -1,3 +1,5 @@
// This file is auto-generated, any edits may be overwritten
#define SOURCE_COMMIT_DATE "2024-Nov-4 15:23:54+0000"
#define SOURCE_COMMIT_HASH "105da7dbfae9b32d5be67bbe12b1dee5fda400c9"
#define SOURCE_COMMIT_DATE "2024-Nov-26 21:49:56+0100"
#define SOURCE_COMMIT_DATE "2024-Nov-26 21:49:56+0100"
#define SOURCE_COMMIT_HASH "1579eba11dbb8ad7a5a924862cdb20402e3a401f"
#define SOURCE_COMMIT_HASH "1579eba11dbb8ad7a5a924862cdb20402e3a401f"

File diff suppressed because one or more lines are too long

View File

@@ -803,12 +803,13 @@ function hexToAscii(hexString) {
function win_chassisType()
{
// needs to be replaced with win-wmi but due to bug in win-wmi it doesnt handle arrays correctly
var cmd = '"Get-CimInstance Win32_SystemEnclosure | Select-Object -ExpandProperty ChassisTypes"';
var child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['powershell', '-noprofile', '-nologo', '-command', cmd], {});
var child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['powershell', '-noprofile', '-nologo', '-command', '-'], {});
if (child == null) { return ([]); }
child.descriptorMetadata = 'process-manager';
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
child.stderr.str = ''; child.stderr.on('data', function (c) { this.str += c.toString(); });
child.stdin.write('Get-WmiObject Win32_SystemEnclosure | Select-Object -ExpandProperty ChassisTypes\r\n');
child.stdin.write('exit\r\n');
child.waitExit();
try {
return (parseInt(child.stdout.str));