cpu() improved detection (win)

This commit is contained in:
Sebastian Hildebrandt 2021-08-26 15:17:33 +02:00
parent 595c17abaf
commit ec513b88bd
4 changed files with 14 additions and 5 deletions

View File

@ -77,6 +77,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.8.6 | 2021-08-26 | `cpu()` improved detection (win) |
| 5.8.5 | 2021-08-26 | `osInfo()` hyper-v detection fix (win VM) |
| 5.8.4 | 2021-08-26 | `graphics()` added vendor (macOS) |
| 5.8.3 | 2021-08-26 | `graphics()` fix empty controller (macOS) |

View File

@ -56,6 +56,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.8.6</th>
<td>2021-08-26</td>
<td><span class="code">cpu()</span> improved detection (win)</td>
</tr>
<tr>
<th scope="row">5.8.5</th>
<td>2021-08-26</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.8.5</span></div>
<div class="version">New Version: <span id="version">5.8.6</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">

View File

@ -753,7 +753,8 @@ function getCpu() {
const workload = [];
workload.push(util.wmic('cpu get /value'));
workload.push(util.wmic('path Win32_CacheMemory get CacheType,InstalledSize,Purpose'));
workload.push(util.powerShell('Get-ComputerInfo -property "HyperV*"'));
// workload.push(util.powerShell('Get-ComputerInfo -property "HyperV*"'));
workload.push(util.powerShell('(Get-CimInstance Win32_ComputerSystem).HypervisorPresent'));
Promise.all(
workload
@ -832,9 +833,11 @@ function getCpu() {
}
}
});
lines = data[2].split('\r\n');
result.virtualization = (util.getValue(lines, 'HyperVRequirementVirtualizationFirmwareEnabled').toLowerCase() === 'true');
result.virtualization = (util.getValue(lines, 'HyperVisorPresent').toLowerCase() === 'true');
// lines = data[2].split('\r\n');
// result.virtualization = (util.getValue(lines, 'HyperVRequirementVirtualizationFirmwareEnabled').toLowerCase() === 'true');
// result.virtualization = (util.getValue(lines, 'HyperVisorPresent').toLowerCase() === 'true');
const hyperv = data[2] ? data[2].toString().toLowerCase() : '';
result.virtualization = hyperv.indexOf('true') !== -1;
resolve(result);
});