1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-31 15:43:57 +00:00

1. Added -b64exec

2. Updated service-manager on windows to ignore running state when uninstalling
This commit is contained in:
Bryan Roe
2019-09-13 11:37:41 -07:00
parent 98aed4c889
commit 660aabb178
4 changed files with 29 additions and 28 deletions

View File

@@ -1870,24 +1870,18 @@ function serviceManager()
if (process.platform == 'win32')
{
if (service.status.state == undefined || service.status.state == 'STOPPED')
try
{
try
{
require('fs').unlinkSync(servicePath);
}
catch (e)
{
}
if (this.proxy.DeleteService(service._service) == 0)
{
throw ('Uninstall Service for: ' + name + ', failed with error: ' + this.proxy2.GetLastError());
}
require('fs').unlinkSync(servicePath);
}
else
catch (e)
{
throw ('Cannot uninstall service: ' + name + ', because it is: ' + service.status.state);
}
if (this.proxy.DeleteService(service._service) == 0)
{
throw ('Uninstall Service for: ' + name + ', failed with error: ' + this.proxy2.GetLastError());
}
service.close();
service = null;
}
@@ -1969,8 +1963,8 @@ function serviceManager()
try
{
require('fs').unlinkSync(servicePath);
require('fs').unlinkSync('/Library/LaunchDaemons/' + name + '.plist');
require('fs').unlinkSync(servicePath);
}
catch(e)
{