systeminformation
Advanced tools
Comparing version 5.25.4 to 5.25.5
@@ -1123,3 +1123,22 @@ 'use strict'; | ||
if (_windows) { | ||
resolve('cmd'); | ||
try { | ||
const result = 'CMD'; | ||
util.powerShell(`Get-CimInstance -className win32_process | where-object {$_.ProcessId -eq ${process.ppid} } | select Name`).then(stdout => { | ||
let result = 'CMD'; | ||
if (stdout) { | ||
if (stdout.toString().toLowerCase().indexOf('powershell') >= 0) { | ||
result = 'PowerShell'; | ||
} | ||
} | ||
if (callback) { | ||
callback(result); | ||
} | ||
resolve(result); | ||
}); | ||
} catch { | ||
if (callback) { | ||
callback(result); | ||
} | ||
resolve(result); | ||
} | ||
} else { | ||
@@ -1126,0 +1145,0 @@ let result = ''; |
{ | ||
"name": "systeminformation", | ||
"version": "5.25.4", | ||
"version": "5.25.5", | ||
"description": "Advanced, lightweight system and OS information library", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
817758
18394