diff --git a/CHANGELOG.md b/CHANGELOG.md
index f297747..fcf3719 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
+| 4.19.1 | 2020-01-14 | `osInfo()` uefi fix windows |
| 4.19.0 | 2020-01-12 | `osInfo()` added uefi |
| 4.18.3 | 2020-01-10 | `fsSize()` fix excluding loop/snap devices |
| 4.18.2 | 2020-01-10 | `memLayout()` fix memsize linux (modules >= 32 GB) |
diff --git a/docs/history.html b/docs/history.html
index 93306e3..13e2dc8 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -83,6 +83,11 @@
+
+ | 4.19.1 |
+ 2020-01-14 |
+ osInfo() uefi fix windows |
+
| 4.19.0 |
2020-01-12 |
diff --git a/docs/index.html b/docs/index.html
index cf0501a..f414e98 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -168,7 +168,7 @@
systeminformation
- Current Version: 4.19.0
+ Current Version: 4.19.1
@@ -206,7 +206,7 @@
Downloads last month
diff --git a/lib/osinfo.js b/lib/osinfo.js
index 85ae086..26ab2b1 100644
--- a/lib/osinfo.js
+++ b/lib/osinfo.js
@@ -336,13 +336,17 @@ function isUefiLinux() {
function isUefiWindows() {
return new Promise((resolve) => {
process.nextTick(() => {
- exec('%windir%\\Panther\\setupact.log | findstr "Detected boot environment" ', util.execOptsWin, function (error, stdout) {
- if (!error) {
- const line = stdout.toString().split('\n\r')[0];
- resolve(line.toLowerCase().indexOf('uefi') >= 0);
- }
+ try {
+ exec('type %windir%\\Panther\\setupact.log | findstr "Detected boot environment" ', util.execOptsWin, function (error, stdout) {
+ if (!error) {
+ const line = stdout.toString().split('\n\r')[0];
+ resolve(line.toLowerCase().indexOf('uefi') >= 0);
+ }
+ resolve(false);
+ });
+ } catch(e) {
resolve(false);
- });
+ }
});
});
}