1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-23 19:53:47 +00:00

Updated 64bit check for powershell

This commit is contained in:
Bryan Roe
2022-10-03 09:43:50 -07:00
parent 37a6e5207b
commit 6a06f9b46b

View File

@@ -192,7 +192,14 @@ function vt()
{
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
{