1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-22 03:03:18 +00:00

Fixed bug in Windows Installer when querying agent name if service has never been installed

This commit is contained in:
Bryan Roe
2020-11-10 09:40:40 -08:00
parent 8e672f11af
commit b6b6cb27bc
2 changed files with 9 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -82,7 +82,14 @@ function checkParameters(parms)
else
{
// Still no meshServiceName specified... Let's also check installed services...
var tmp = require('_agentNodeId').serviceName();
var tmp = process.platform == 'win32' ? 'Mesh Agent' : 'meshagent';
try
{
tmp = require('_agentNodeId').serviceName();
}
catch(xx)
{
}
if(tmp != (process.platform == 'win32' ? 'Mesh Agent' : 'meshagent'))
{
parms.push('--meshServiceName="' + tmp + '"');