put quotes around username for scheduled tasks on windows

Bryan Roe committed Feb 3, 2021 at 10:20 UTC 7d28a0648e1f59be83f66496b1b326f166984e07
1 file changed +1 -1
agents/meshcore.js
+1 -1
@@ -2627,7 +2627,7 @@ function openUserDesktopUrl(url) {
2627 child = require('child_process').execFile(process.env['windir'] + '\\system32\\cmd.exe', ['cmd']);
2628 child.stderr.on('data', function () { });
2629 child.stdout.on('data', function () { });
2630 - 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');
2630 + 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');
2631 child.stdin.write('SCHTASKS /RUN /TN MeshChatTask\r\n');
2632 child.stdin.write('SCHTASKS /DELETE /F /TN MeshChatTask\r\n');
2633 child.stdin.write('exit\r\n');