mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-03 09:55:57 -05:00
put quotes around username for scheduled tasks on windows
This commit is contained in:
parent
74072dbee7
commit
7d28a0648e
@ -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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user