Yesterday I experimented with OCaml and opam on my Windows system without using an installer—I just placed the binaries in a folder. A short time later, I removed the binaries. Now, whenever I run any batch file in PowerShell only, I get this:
C:\> .\test.bat
'opam' is not recognized as an internal or external command,
operable program or batch file.
"Hi!!"
Here is the contents of test.bat, but this is happening with any batch file I execute:
@echo off
echo "Hi!!"
As you can see from the output in PowerShell, it appears an attempt is made to execute opam, which, of course, cannot be found, since the binaries are removed. Then, the batch file runs normally. Note that this does not happen when running the batch file with cmd.exe.
What is going on here, and how can I fix it?
Win+r
like this:Powershell -NoProfile
?