diff --git a/index.js b/index.js index 59a3de6..3e1a5af 100644 --- a/index.js +++ b/index.js @@ -169,7 +169,7 @@ const baseOpen = async options => { command = isWsl ? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` - : `${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`; + : `${process.env.SYSTEMROOT || process.env.windir || 'C:\\Windows'}\\System32\\WindowsPowerShell\\v1.0\\powershell`; cliArguments.push( '-NoProfile',