From c40659d45218369e20906fc48e7defbff37ed0e2 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 18 Nov 2022 13:57:09 +0100 Subject: [PATCH] users() fix parsing issue (windows) --- CHANGELOG.md | 3 ++- docs/history.html | 5 +++++ docs/index.html | 2 +- lib/users.js | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1734bf5..f80cfe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,7 +81,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | -| 5.13.4 | 2022-11-18 | `users()` fix issue (windows) | +| 5.13.5 | 2022-11-18 | `users()` fix parsing issue (windows) | +| 5.13.4 | 2022-11-18 | `users()` fix Get-CimInstance issue (windows) | | 5.13.3 | 2022-11-18 | `cpuTemperature()` fix main temp (linux) | | 5.13.2 | 2022-11-18 | `cpuTemperature()` fix main temp (linux) | | 5.13.1 | 2022-11-18 | `processLoad()` fix main pid (linux) | diff --git a/docs/history.html b/docs/history.html index f0c409b..31e6c1f 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.13.5 + 2022-11-18 + users() fix pasring issue (windows) + 5.13.4 2022-11-18 diff --git a/docs/index.html b/docs/index.html index 45c8dd0..c3ffece 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.13.4
+
New Version: 5.13.5
diff --git a/lib/users.js b/lib/users.js index cf61be1..b5da3d3 100644 --- a/lib/users.js +++ b/lib/users.js @@ -210,7 +210,7 @@ function users(callback) { let cmd = 'Get-CimInstance Win32_LogonSession | select LogonId,@{n="StartTime";e={$_.StartTime.ToString("yyyy-MM-dd HH:mm:ss")}} | fl' + '; echo \'#-#-#-#\';'; cmd += 'Get-CimInstance Win32_LoggedOnUser | select antecedent,dependent | fl ' + '; echo \'#-#-#-#\';'; // cmd += `Get-CimInstance Win32_Process -Filter 'name="explorer.exe"' | Select @{Name="sessionid";Expression={$_.SessionId}}, @{Name="domain";Expression={$_.GetOwner().Domain}}, @{Name="username";Expression={$_.GetOwner().User}} | fl` + '; echo \'#-#-#-#\';'; - cmd += '$process = (Get-CimInstance Win32_Process -Filter "name = \'explorer.exe\'"); Invoke-CimMethod -InputObject $process -MethodName GetOwner | select user, domain | fl; get-process -name explorer | select-object sessionid | fl; echo \'# -# -# -#\';'; + cmd += '$process = (Get-CimInstance Win32_Process -Filter "name = \'explorer.exe\'"); Invoke-CimMethod -InputObject $process -MethodName GetOwner | select user, domain | fl; get-process -name explorer | select-object sessionid | fl; echo \'#-#-#-#\';'; cmd += 'query user'; util.powerShell(cmd).then((data) => { if (data) {