Updated so Powershell tries to load 64 bit on 64bit windows before falling back to 32 bit

This commit is contained in:
Bryan Roe 2021-03-14 18:27:16 -07:00
parent 3b2ef66dcd
commit ca5a1a7d7b
2 changed files with 16 additions and 2 deletions

View File

@ -251,7 +251,14 @@ function windows_terminal() {
{ {
if (require('os').arch() == 'x64') if (require('os').arch() == 'x64')
{ {
return (this.StartEx(CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT, process.env['windir'] + '\\SysWow64\\WindowsPowerShell\\v1.0\\powershell.exe')); if (require('fs').existsSync(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe'))
{
return (this.StartEx(CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT, process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe'));
}
else
{
return (this.StartEx(CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT, process.env['windir'] + '\\SysWow64\\WindowsPowerShell\\v1.0\\powershell.exe'));
}
} }
else else
{ {

View File

@ -192,7 +192,14 @@ function vt()
{ {
if (require('os').arch() == 'x64') if (require('os').arch() == 'x64')
{ {
return (this.Create(process.env['windir'] + '\\SysWow64\\WindowsPowerShell\\v1.0\\powershell.exe', CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT)); if (require('fs').existsSync(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe'))
{
return (this.Create(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT));
}
else
{
return (this.Create(process.env['windir'] + '\\SysWow64\\WindowsPowerShell\\v1.0\\powershell.exe', CONSOLE_SCREEN_WIDTH, CONSOLE_SCREEN_HEIGHT));
}
} }
else else
{ {