New
#1
Double-click to run .bat - Windows cannot find file
Recently (seemingly out of nowhere) my Windows 10 PC stopped running .bat files when I double-click on them. If I right-click and "Run as administrator" the files run. If I open a command prompt and invoke the bat file it also runs. This is true for every bat file I have tried in all of the different folders and drives I have tried.
For example, I created Test.bat in M:\Downloads\. The content of this file is just one command "pause".
This is the error message I get when double-clicking the file in explorer:
Right-click and "Run as administrator":
And from a command prompt:
I have tried the following:
1. File Association Fixer
2. Checked the system environment variable COMSPEC. It is correct: %SystemRoot%\system32\cmd.exe.
3. sfc /scannow - the result was "Verification 100% complete. Windows Resource Protection did not find any integrity violations."
Any ideas?