1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-10 05:13:38 +00:00

1. Removed dead code from service-manager.js2.

2. Updated win-dispatcher to create task using command line parameters, instead of stdin, negating need to export/import XML to fix non-english characters
This commit is contained in:
Bryan Roe
2020-05-01 11:30:50 -07:00
parent 33c089e275
commit 3816c47a58
3 changed files with 16 additions and 53 deletions

View File

@@ -69,20 +69,6 @@ function perpareFolders(folderPath)
}
}
function win_deleteLater(delaySeconds, commandPath, arguments)
{
if (process.platform != 'win32') { throw ('This Method is only supported on Windows'); }
var needFix = (commandPath.length != Buffer.from(commandPath).length) || (arguments.length != Buffer.from(arguments).length);
var info = require('user-sessions').getProcessOwnerName(process.pid);
var child = require('child_process').execFile(process.env['windir'] + '\\system32\\cmd.exe', ['cmd']);
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
child.stderr.str = ''; child.stderr.on('data', function (c) { this.str += c.toString(); });
//child.stdin.write('SCHTASKS /CREATE /TN _ServiceTask /ST 00:00 /ONCE /RU ' + info.domain + '\\' + info.user + ' /TR "\\"' + process.env['windir'] + '\\system32\\cmd.exe /C choice /C Y /N /D Y /T 2 & del'
}
function parseServiceStatus(token)
{
var j = {};