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
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:
parent
504ecf272d
commit
5572caa470
@ -229,6 +229,7 @@ function osInfo(callback) {
|
|||||||
release: 'unknown',
|
release: 'unknown',
|
||||||
codename: '',
|
codename: '',
|
||||||
domain: '',
|
domain: '',
|
||||||
|
locationservice: '',
|
||||||
kernel: os.release(),
|
kernel: os.release(),
|
||||||
arch: os.arch(),
|
arch: os.arch(),
|
||||||
hostname: os.hostname(),
|
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('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('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('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) => {
|
util.promiseAll(workload).then((data) => {
|
||||||
const lines = data.results[0] ? data.results[0].toString().split('\r\n') : [''];
|
const lines = data.results[0] ? data.results[0].toString().split('\r\n') : [''];
|
||||||
result.distro = util.getValue(lines, 'Caption', ':').trim();
|
result.distro = util.getValue(lines, 'Caption', ':').trim();
|
||||||
@ -386,6 +388,10 @@ function osInfo(callback) {
|
|||||||
const buildNum = parseInt(result.build, 10);
|
const buildNum = parseInt(result.build, 10);
|
||||||
result.codename = getWindowsRelease(buildNum);
|
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;
|
result.remoteSession = term.toString().toLowerCase().indexOf('true') >= 0;
|
||||||
isUefiWindows().then((uefi) => {
|
isUefiWindows().then((uefi) => {
|
||||||
result.uefi = uefi;
|
result.uefi = uefi;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user