Windows cannot find .bat. Make sure you typed the name correctly, and then try again

batch filecmd.exewindowswindows 10

I have no idea when this started to happen but it is preventing me from opening .bat files on double click. I am only able to run it as administrator. Is there anyway to fix this so i can double click instead of running as administrator? This causes some programs not to work.

I've tried to reset the file association in the registry, checked the environment variables, and I checked to see if cmd was actually in the System32 folder.

If more info is needed, I will try to provide it.

Best Answer

Okay, some of you might think I'm stupid but this is how I solved this issue.

I went into my environment variables and was looking for COMSPEC but instead I found ComSpec. Once I renamed it back to COMSPEC everything started working again.

I have no idea how it was even renamed in the first place but that fixed my issue.

Hope this helps other people with this issue.

Related Question