mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-06 02:23:59 +00:00
replace wmi service with net
This commit is contained in:
@@ -923,8 +923,8 @@ function serviceManager()
|
||||
if (this.isMe())
|
||||
{
|
||||
// In order to restart ourselves on Windows, we must spawn a detached child process, becuase we need to call start, once we are stopped
|
||||
require('child_process')._execve(process.env['windir'] + '\\system32\\cmd.exe', ['cmd.exe', '/C wmic service "' + this.name + '" call stopservice & wmic service "' + this.name + '" call startservice']);
|
||||
}
|
||||
require('child_process')._execve(process.env['windir'] + '\\system32\\cmd.exe', ['cmd.exe', '/C net stop "' + this.name + '" & net stop "' + this.name + '"']);
|
||||
}
|
||||
else
|
||||
{
|
||||
var p = this.stop();
|
||||
|
||||
Reference in New Issue
Block a user