From 8c44ed60c7a6a379f3391262b2b159e9a792332e Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Mon, 16 Sep 2019 13:08:29 -0700 Subject: [PATCH] Updated 'uninstallAgent' to try to uninstall secondary agent too. --- agents/meshcore.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/agents/meshcore.js b/agents/meshcore.js index 7690cb47..9f7d8978 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1861,6 +1861,13 @@ function createMeshCore(agent) } else { + try + { + diagnosticAgent_uninstall(); + } + catch(x) + { + } var js = "require('service-manager').manager.getService('" + agentName + "').stop(); require('service-manager').manager.uninstallService('" + agentName + "'); process.exit();"; this.child = require('child_process').execFile(process.execPath, [process.platform == 'win32' ? (process.execPath.split('\\').pop()) : (process.execPath.split('/').pop()), '-b64exec', Buffer.from(js).toString('base64')], { type: 4, detached: true }); }