osInfo() add locationservice (windows)
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
Test / build (16.x, macos-latest) (push) Has been cancelled
Test / build (16.x, ubuntu-latest) (push) Has been cancelled
Test / build (16.x, windows-latest) (push) Has been cancelled
Test / build (17.x, ubuntu-latest) (push) Has been cancelled
Test / build (18.x, macos-latest) (push) Has been cancelled
Test / build (18.x, ubuntu-latest) (push) Has been cancelled
Test / build (18.x, windows-latest) (push) Has been cancelled
Test / build (19.x, ubuntu-latest) (push) Has been cancelled
Test / build (20.x, macos-latest) (push) Has been cancelled
Test / build (20.x, ubuntu-latest) (push) Has been cancelled
Test / build (20.x, windows-latest) (push) Has been cancelled

This commit is contained in:
Mike Müller 2026-02-26 23:39:56 +01:00
parent 504ecf272d
commit 5572caa470

View File

@ -229,6 +229,7 @@ function osInfo(callback) {
release: 'unknown',
codename: '',
domain: '',
locationservice: '',
kernel: os.release(),
arch: os.arch(),
hostname: os.hostname(),
@ -366,6 +367,7 @@ function osInfo(callback) {
workload.push(util.powerShell('Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SystemInformation]::TerminalServerSession'));
workload.push(util.powerShell('reg query "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" /v DisplayVersion'));
workload.push(util.powerShell('Get-CimInstance Win32_ComputerSystem | select Domain | fl '));
workload.push(util.powerShell('reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore" /v location'));
util.promiseAll(workload).then((data) => {
const lines = data.results[0] ? data.results[0].toString().split('\r\n') : [''];
result.distro = util.getValue(lines, 'Caption', ':').trim();
@ -386,6 +388,10 @@ function osInfo(callback) {
const buildNum = parseInt(result.build, 10);
result.codename = getWindowsRelease(buildNum);
}
if (data.results[5]) {
const locationParts = data.results[5].split('REG_SZ');
result.locationservice = locationParts.length > 1 ? locationParts[1].trim() : '';
}
result.remoteSession = term.toString().toLowerCase().indexOf('true') >= 0;
isUefiWindows().then((uefi) => {
result.uefi = uefi;