From 7d28a0648e1f59be83f66496b1b326f166984e07 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Wed, 3 Feb 2021 10:20:14 -0800 Subject: [PATCH] put quotes around username for scheduled tasks on windows --- agents/meshcore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents/meshcore.js b/agents/meshcore.js index 26d2c4ad..1c9634f2 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -2627,7 +2627,7 @@ function openUserDesktopUrl(url) { child = require('child_process').execFile(process.env['windir'] + '\\system32\\cmd.exe', ['cmd']); child.stderr.on('data', function () { }); child.stdout.on('data', function () { }); - child.stdin.write('SCHTASKS /CREATE /F /TN MeshChatTask /SC ONCE /ST 00:00 /RU ' + user + ' /TR "' + process.env['windir'] + '\\system32\\cmd.exe /C START ' + url.split('&').join('^&') + '"\r\n'); + child.stdin.write('SCHTASKS /CREATE /F /TN MeshChatTask /SC ONCE /ST 00:00 /RU "' + user + '" /TR "' + process.env['windir'] + '\\system32\\cmd.exe /C START ' + url.split('&').join('^&') + '"\r\n'); child.stdin.write('SCHTASKS /RUN /TN MeshChatTask\r\n'); child.stdin.write('SCHTASKS /DELETE /F /TN MeshChatTask\r\n'); child.stdin.write('exit\r\n');