Skip to content

Export getRawProcessTree as getSystemProcessList and added flag to ge…#73

Open
MohammedChaibi wants to merge 1 commit intomicrosoft:mainfrom
MohammedChaibi:exposePorcessListandFilterByOwner
Open

Export getRawProcessTree as getSystemProcessList and added flag to ge…#73
MohammedChaibi wants to merge 1 commit intomicrosoft:mainfrom
MohammedChaibi:exposePorcessListandFilterByOwner

Conversation

@MohammedChaibi
Copy link

Exposed raw process list with getSystemProcesslist and added owner flag. With this the user can get the list of all processes and is able to filter using the name, commandLine and owner.
i.e
const flags = ProcessDataFlag.CommandLine | ProcessDataFlag.Owner;
const processes = await getSystemProcessList.promisify(flags);
const myProcess = processes.filter(p => (p.name ?? '').includes('processName') &&
(p.commandLine ?? '').includes('myprocess') &&
(p.owner ?? '').includes('username'))[0];

@MohammedChaibi

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant