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.
$env:PATHEXTinclude '.BAT'?PATHEXTvariable to the user variables with the value.tcl, this new variable removed the effect of the system variablePATHEXTwhich now only contains, I removedPATHEXTfrom user variables and added.tcltoPATHEXTin the system variables and now it works, so please add the answer to get the credit