Fixed Powershell crash

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

View File

@ -134,7 +134,11 @@ function windows_terminal() {
this.PowerShellCapable = function()
{
return (require('fs').existsSync(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe'));
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)
@ -220,7 +224,14 @@ function windows_terminal() {
}
this.StartPowerShell = function StartPowerShell(CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT)
{
return (this.StartEx(CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT, process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe'));
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 () {

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",