Reputation: 289
I'm using this new machine, so as usual I go and set the execution policy so that I can use my profile script, after doing that however powershell now opens all batch files in a new cmd.exe window.
I tried undoing this step but it's still the same so I think it has nothing to do with the script execution policy, also I still have the powershell window in which I originally set the execution policy and this one behaves normally, only new windows have this problem.
I may have installed some software, but nothing is related to windows, and I tried setting the PATH variable to its exact value in the working window but it does not work.
Upvotes: 2
Views: 501
Reputation: 24343
Batch files will open in a new window if the PATHEXT
environment variable does not contain '.BAT
' as one of the executable extensions.
To check the variable, enter the following at the PowerShell prompt: $env:PATHEXT
Upvotes: 3