mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-14 12:01:52 +00:00
Updated 'uninstallAgent' to try to uninstall secondary agent too.
This commit is contained in:
parent
467f59e0d4
commit
15d59ca30d
1 changed files with 7 additions and 0 deletions
|
@ -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 });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue