Skip to content

Enhancement teams cache remove: detect Teams PID on Windows. #3448

@Jwaegebaert

Description

@Jwaegebaert

Enhancement originates from


With running the command `teams cache remove` on a Windows device, we force kill all the processes named `Teams.exe`.

switch (platform) {
case 'win32':
cmd = 'taskkill /IM "Teams.exe" /F';
break;

Here, it would be nice to first fetch all available Teams pids and the close them relatively. If no pids are returned, we can skip the force close. This is how we currently do it for macOS.

Getting the available pids:

case 'darwin':
cmd = `ps ax | grep MacOS/Teams -m 1 | grep -v grep | awk '{ print $1 }'`;
break;

Closing the relative pids, if any:

if (cmdOutput.stdout !== '' && platform === 'darwin') {
process.kill(cmdOutput.stdout);
}

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions