Fixed Powershell crash

This commit is contained in:
Ylian Saint-Hilaire 2019-07-25 09:30:57 -07:00
parent 82e4415843
commit 237e371d17
3 changed files with 15 additions and 4 deletions

View File

@ -134,8 +134,12 @@ function windows_terminal() {
this.PowerShellCapable = function()
{
if (require('os').arch() == 'x64') {
return (require('fs').existsSync(process.env['windir'] + '\\SysWow64\\WindowsPowerShell\\v1.0\\powershell.exe'));
} else {
return (require('fs').existsSync(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe'));
}
}
this.StartEx = function Start(CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT, terminalTarget)
{
@ -219,9 +223,16 @@ function windows_terminal() {
return (this.StartEx(CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT, process.env['windir'] + '\\System32\\cmd.exe'));
}
this.StartPowerShell = function StartPowerShell(CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT)
{
if (require('os').arch() == 'x64')
{
return (this.StartEx(CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT, process.env['windir'] + '\\SysWow64\\WindowsPowerShell\\v1.0\\powershell.exe'));
}
else
{
return (this.StartEx(CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT, process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe'));
}
}
this._stop = function () {
if (this.stopping) { return (this.stopping); }

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.3.8-n",
"version": "0.3.8-o",
"keywords": [
"Remote Management",
"Intel AMT",