diff --git a/agents/MeshCentralAssistant.exe b/agents/MeshCentralAssistant.exe
index 6de35349..4ac2b508 100644
Binary files a/agents/MeshCentralAssistant.exe and b/agents/MeshCentralAssistant.exe differ
diff --git a/meshagent.js b/meshagent.js
index af809803..6ff541c7 100644
--- a/meshagent.js
+++ b/meshagent.js
@@ -1499,6 +1499,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
var info = parent.parent.meshToolsBinaries[command.name];
if ((command.hash != null) && (info.hash == command.hash)) return;
const responseCmd = { action: 'meshToolInfo', name: command.name, tag: command.tag, sessionid: command.sessionid, hash: info.hash, size: info.size, url: info.url };
+ if ((command.name == 'MeshCentralAssistant') && (command.msh == true)) { responseCmd.url = "*/meshagents?id=10006"; } // If this is Assistant and the MSH needs to be included in the executable, change the URL.
if (command.cookie === true) { responseCmd.url += ('&auth=' + parent.parent.encodeCookie({ download: info.dlname }, parent.parent.loginCookieEncryptionKey)); }
if (command.pipe === true) { responseCmd.pipe = true; }
if (parent.webCertificateHashs[domain.id] != null) { responseCmd.serverhash = Buffer.from(parent.webCertificateHashs[domain.id], 'binary').toString('hex'); }
diff --git a/meshcentral-config-schema.json b/meshcentral-config-schema.json
index e7c5a837..ece09e22 100644
--- a/meshcentral-config-schema.json
+++ b/meshcentral-config-schema.json
@@ -452,7 +452,8 @@
"description": "Use this section to customize the MeshCentral Assistant.",
"properties": {
"title": { "type": "string", "default": "MeshCentral Assistant", "description": "Name to show as MeshCentral Assistant dialog title." },
- "image": { "type": "string", "default": null, "description": "The filename of a image file in .png format located in meshcentral-data to display in MeshCentral Assistant, image should be square and from 64x64 to 128x128." }
+ "image": { "type": "string", "default": null, "description": "The filename of a image file in .png format located in meshcentral-data to display in MeshCentral Assistant, image should be square and from 64x64 to 128x128." },
+ "fileName": { "type": "string", "default": "meshagent", "description": "The MeshCentral Assistant filename." }
}
},
"userAllowedIP": { "type": "string" },
diff --git a/views/default.handlebars b/views/default.handlebars
index 2a507f61..824ec9d1 100644
--- a/views/default.handlebars
+++ b/views/default.handlebars
@@ -4757,7 +4757,7 @@
x += '
' + format("To add a mobile device to group \"{0}\", download the MeshAgent application and scan this QR code.", EscapeHtml(mesh.name)) + '
';
// MeshCentral Assistant
- x += '' + format("MeshCentral Assistant is a Windows system tray tool that users can use to ask for help. Use the link below to download a version that will connect to device group \"{0}\".", EscapeHtml(mesh.name)) + ' ';
+ x += '' + format("MeshCentral Assistant is a Windows tool that users can use to ask for help. Use the link below to download a version that will connect to device group \"{0}\".", EscapeHtml(mesh.name)) + ' ';
x += '' + "Assistant for Windows (.exe)" + ' ';
x += ' |  |
';
diff --git a/webserver.js b/webserver.js
index ac5ae8da..cc1672ec 100644
--- a/webserver.js
+++ b/webserver.js
@@ -4637,14 +4637,6 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
if ((domain.agentnoproxy === true) || (obj.args.lanonly == true)) { meshsettings += 'ignoreProxyFile=1\r\n'; }
if (obj.args.agentconfig) { for (var i in obj.args.agentconfig) { meshsettings += obj.args.agentconfig[i] + '\r\n'; } }
if (domain.agentconfig) { for (var i in domain.agentconfig) { meshsettings += domain.agentconfig[i] + '\r\n'; } }
- if ((req.query.id != '10006') && (domain.agentcustomization != null)) { // Add agent customization, not for Assistant
- if (domain.agentcustomization.displayname != null) { meshsettings += 'displayName=' + domain.agentcustomization.displayname + '\r\n'; }
- if (domain.agentcustomization.description != null) { meshsettings += 'description=' + domain.agentcustomization.description + '\r\n'; }
- if (domain.agentcustomization.companyname != null) { meshsettings += 'companyName=' + domain.agentcustomization.companyname + '\r\n'; }
- if (domain.agentcustomization.servicename != null) { meshsettings += 'meshServiceName=' + domain.agentcustomization.servicename + '\r\n'; }
- if (domain.agentcustomization.filename != null) { meshsettings += 'fileName=' + domain.agentcustomization.filename + '\r\n'; }
- }
- if ((parent.agentTranslations != null) && (req.query.id != '10006')) { meshsettings += 'translation=' + parent.agentTranslations + '\r\n'; } // Translation strings, not for MeshCentral Assistant
if (req.query.id == '10006') { // Assistant settings and customizations
if ((req.query.ac != null)) { meshsettings += 'AutoConnect=' + req.query.ac + '\r\n'; } // Set MeshCentral Assistant flags if needed. 0x01 = Always Connected, 0x02 = Not System Tray
if ((domain.assistantcustomization != null) && (typeof domain.assistantcustomization == 'object')) {
@@ -4652,7 +4644,17 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
if (typeof domain.assistantcustomization.image == 'string') {
try { meshsettings += 'Image=' + Buffer.from(obj.fs.readFileSync(parent.getConfigFilePath(domain.assistantcustomization.image)), 'binary').toString('base64') + '\r\n'; } catch (ex) { console.log(ex); }
}
+ if (typeof domain.assistantcustomization.filename == 'string') { meshfilename = meshfilename.split('MeshCentralAssistant').join(domain.assistantcustomization.filename); }
}
+ } else { // Add agent customization, not for Assistant
+ if (domain.agentcustomization != null) {
+ if (domain.agentcustomization.displayname != null) { meshsettings += 'displayName=' + domain.agentcustomization.displayname + '\r\n'; }
+ if (domain.agentcustomization.description != null) { meshsettings += 'description=' + domain.agentcustomization.description + '\r\n'; }
+ if (domain.agentcustomization.companyname != null) { meshsettings += 'companyName=' + domain.agentcustomization.companyname + '\r\n'; }
+ if (domain.agentcustomization.servicename != null) { meshsettings += 'meshServiceName=' + domain.agentcustomization.servicename + '\r\n'; }
+ if (domain.agentcustomization.filename != null) { meshsettings += 'fileName=' + domain.agentcustomization.filename + '\r\n'; }
+ }
+ if (parent.agentTranslations != null) { meshsettings += 'translation=' + parent.agentTranslations + '\r\n'; } // Translation strings, not for MeshCentral Assistant
}
setContentDispositionHeader(res, 'application/octet-stream', meshfilename, null, argentInfo.rname);
obj.parent.exeHandler.streamExeWithMeshPolicy({ platform: 'win32', sourceFileName: obj.parent.meshAgentBinaries[req.query.id].path, destinationStream: res, msh: meshsettings, peinfo: obj.parent.meshAgentBinaries[req.query.id].pe });
|