mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-23 22:13:14 +03:00
Updated 'uninstallAgent' to try to uninstall secondary agent too.
This commit is contained in:
parent
467f59e0d4
commit
15d59ca30d
@ -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 New Issue
Block a user