Unable to run batch file

cmd.exewindowswindows 7

I'm trying to run a .bat file which contains the below code

echo "Test"
pause

It throws the following error

Windows cannot find 'c:\Users\test\Desktop\run.bat'.
Make sure you typed the name correctly, and then try again.

enter image description here

The above user has all administrator rights.

But when I run this .bat as Run as Administrator it is executing properly. I tried running in new user account with admin privileges but still no luck.

I tried to modify regedit:

Hkey_Current_User\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat

But .bat key doesn't exist there.

Best Answer

check to see if the actual cmd.exe is within the system32 folder, if it is then try opening the file through the cmd itself.

C:\Users\kamal\Desktop\run.bat
Related Question