Updated 'uninstallAgent' to try to uninstall secondary agent too.

This commit is contained in:
Bryan Roe 2019-09-16 13:08:29 -07:00
parent 467f59e0d4
commit 15d59ca30d

View File

@ -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 });
}