From 2533410c780cfe8c7bee583e2c68c7cd029aa2f8 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Sat, 7 May 2022 17:58:27 -0400 Subject: [PATCH] Added kill check for Parallels Acrobat Reader --- app/js/aether_native_app_v3.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/js/aether_native_app_v3.js b/app/js/aether_native_app_v3.js index 5df575a..44837f2 100644 --- a/app/js/aether_native_app_v3.js +++ b/app/js/aether_native_app_v3.js @@ -482,8 +482,19 @@ exports.kill_processes = async function ({process_name = null}) { }); console.log(`Killed processes matching ${process_name}`); - if (os.platform == 'darwin') { + if (process_name == 'Parallels:Acrobat Reader') { + // Regular expression: (Parallels).*(Acrobat Reader) + // This will find any process with Parallels and Acrobat Reader in the name + cmd = `pkill -i -f '(Parallels).*(Acrobat Reader)'`; + + child_process.exec(cmd, (err, stdout, stdin) => { + if (err) throw err; + console.log(stdout); + }); + console.log('Killed Parallels Acrobat Reader process'); + } + if (process_name == 'Parallels:PowerPoint') { // Regular expression: (Parallels).*(PowerPoint) // This will find any process with Parallels and PowerPoint in the name