osInfo() improved UEFI detection (windows)

This commit is contained in:
Sebastian Hildebrandt 2021-05-26 14:43:52 +02:00
parent bd5a132b12
commit 321792a632
4 changed files with 10 additions and 4 deletions

View File

@ -77,6 +77,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.7.3 | 2021-05-26 | `osInfo()` improved UEFI detection (windows) |
| 5.7.2 | 2021-05-24 | `system()` virtual detection improvement |
| 5.7.1 | 2021-05-20 | `graphics()` Check for qwMemorySize on Windows |
| 5.7.0 | 2021-05-20 | `diskLayout()` added smartdata for win (if istalled) |

View File

@ -56,6 +56,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.7.3</th>
<td>2021-05-26</td>
<td><span class="code">osInfo()</span> improved UEFI detection (windows)</td>
</tr>
<tr>
<th scope="row">5.7.2</th>
<td>2021-05-24</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.7.2</span></div>
<div class="version">New Version: <span id="version">5.7.3</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

@ -384,13 +384,13 @@ function isUefiWindows() {
exec('findstr /C:"Detected boot environment" "%windir%\\Panther\\setupact.log"', util.execOptsWin, function (error, stdout) {
if (!error) {
const line = stdout.toString().split('\n\r')[0];
resolve(line.toLowerCase().indexOf('uefi') >= 0);
resolve(line.toLowerCase().indexOf('uefi') >= 0 || line.toLowerCase().indexOf(' efi') >= 0);
return;
} else {
exec('$env:firmware_type', util.execOptsWin, function (error, stdout) {
exec('echo %firmware_type%', util.execOptsWin, function (error, stdout) {
if (!error) {
const line = stdout.toString() || '';
resolve(line.toLowerCase().indexOf('uefi') >= 0);
resolve(line.toLowerCase().indexOf('efi') >= 0);
}
resolve(false);
});