mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-03 17:13:16 +00:00
Updated windows installer, to ignore PowerShell error on install/uninstall
This commit is contained in:
@@ -543,13 +543,13 @@ function serviceExists(loc, params)
|
||||
{
|
||||
// SUCCESS
|
||||
process.stdout.write(' [DELETED]\n');
|
||||
uninstallService(this._params);
|
||||
uninstallService(params);
|
||||
}, function ()
|
||||
{
|
||||
// FAILED
|
||||
process.stdout.write(' [No Rules Found]\n');
|
||||
uninstallService(this._params);
|
||||
}).parentPromise._params = params;
|
||||
uninstallService(params);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -448,13 +448,21 @@ function removeFirewallRule(options)
|
||||
}
|
||||
}
|
||||
|
||||
if (require('os').arch() == 'x64')
|
||||
try
|
||||
{
|
||||
ret.child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['/C "' + command + '"']);
|
||||
if (require('os').arch() == 'x64')
|
||||
{
|
||||
ret.child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['/C "' + command + '"']);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret.child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['/C "' + command + '"']);
|
||||
}
|
||||
}
|
||||
else
|
||||
catch(f)
|
||||
{
|
||||
ret.child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['/C "' + command + '"']);
|
||||
ret._rej(f.toString());
|
||||
return (ret);
|
||||
}
|
||||
|
||||
ret.child.ret = ret;
|
||||
@@ -493,13 +501,21 @@ function addFirewallRule(options)
|
||||
}
|
||||
|
||||
var child;
|
||||
if (require('os').arch() == 'x64')
|
||||
try
|
||||
{
|
||||
child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['/C "' + command + '"']);
|
||||
if (require('os').arch() == 'x64')
|
||||
{
|
||||
child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['/C "' + command + '"']);
|
||||
}
|
||||
else
|
||||
{
|
||||
child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['/C "' + command + '"']);
|
||||
}
|
||||
}
|
||||
else
|
||||
catch(f)
|
||||
{
|
||||
child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['/C "' + command + '"']);
|
||||
// Unable to call powershell
|
||||
return (true);
|
||||
}
|
||||
|
||||
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
|
||||
|
||||
Reference in New Issue
Block a user