mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
update arrpc
This commit is contained in:
parent
6c0215313c
commit
d0d37caa05
1 changed files with 3 additions and 3 deletions
|
@ -2,16 +2,16 @@ const {exec} = require("child_process");
|
|||
|
||||
const getProcesses = () =>
|
||||
new Promise((res) =>
|
||||
exec(`wmic process get ProcessID,ExecutablePath /format:csv`, (e, out) => {
|
||||
exec(`wmic process get ProcessID,ExecutablePath,Name /format:csv`, (e, out) => {
|
||||
res(
|
||||
out
|
||||
.toString()
|
||||
.split("\r\n")
|
||||
.slice(2)
|
||||
.map((x) => {
|
||||
// [ProcessId, Name, ExecutablePath]
|
||||
const parsed = x.trim().split(",").slice(1).reverse();
|
||||
parsed[0] = parseInt(parsed[0]) || parsed[0]; // pid to int
|
||||
return parsed;
|
||||
return [parseInt(parsed[0]) || parsed[0], parsed[2] || parsed[1]];
|
||||
})
|
||||
.filter((x) => x[1])
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue