diff --git a/CHANGELOG.md b/CHANGELOG.md
index 43acc5c..a2443fc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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) |
diff --git a/docs/history.html b/docs/history.html
index d849925..bef4e20 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -56,6 +56,11 @@
+
+ | 5.8.6 |
+ 2021-08-26 |
+ cpu() improved detection (win) |
+
| 5.8.5 |
2021-08-26 |
diff --git a/docs/index.html b/docs/index.html
index 1983155..3324ab5 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -170,7 +170,7 @@
systeminformation
- New Version: 5.8.5
+ New Version: 5.8.6
diff --git a/lib/cpu.js b/lib/cpu.js
index f5c4aba..ea44cbd 100644
--- a/lib/cpu.js
+++ b/lib/cpu.js
@@ -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);
});