From 5572caa470b12b0a6601a883256156c3138e0ac4 Mon Sep 17 00:00:00 2001 From: Mike Mueller Date: Thu, 26 Feb 2026 23:39:56 +0100 Subject: [PATCH] osInfo() add locationservice (windows) --- lib/osinfo.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/osinfo.js b/lib/osinfo.js index 439d4ce..9a840b3 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -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;