swap powershell write to command instead

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458
2024-11-06 15:37:26 +00:00
parent fc387ca417
commit 7d59210d05
4 changed files with 13 additions and 13 deletions

View File

@@ -870,7 +870,7 @@ function onTunnelControlData(data, ws) {
if (process.platform == 'win32') {
MeshServerLog("Locking remote user out of desktop", ws.httprequest);
var child = require('child_process');
child.execFile(process.env['windir'] + '\\system32\\cmd.exe', ['/c', 'RunDll32.exe user32.dll,LockWorkStation'], { type: 1 });
child.execFile(process.env['windir'] + '\\system32\\cmd.exe', ['cmd', '/c', 'RunDll32.exe user32.dll,LockWorkStation'], { type: 1 });
}
} catch (e) { }
break;