windows - uefi detection fix
This commit is contained in:
parent
a0f80f670d
commit
b57bfe978f
@ -337,14 +337,14 @@ function isUefiWindows() {
|
|||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
process.nextTick(() => {
|
process.nextTick(() => {
|
||||||
try {
|
try {
|
||||||
exec('type %windir%\\Panther\\setupact.log | findstr "Detected boot environment" ', util.execOptsWin, function (error, stdout) {
|
exec('findstr /C:"Detected boot environment" "%windir%\\Panther\\setupact.log"', util.execOptsWin, function (error, stdout) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
const line = stdout.toString().split('\n\r')[0];
|
const line = stdout.toString().split('\n\r')[0];
|
||||||
resolve(line.toLowerCase().indexOf('uefi') >= 0);
|
resolve(line.toLowerCase().indexOf('uefi') >= 0);
|
||||||
}
|
}
|
||||||
resolve(false);
|
resolve(false);
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
resolve(false);
|
resolve(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user