Windows 10: Double-click to run .bat - Windows cannot find file

Discus and support Double-click to run .bat - Windows cannot find file in Windows 10 Support to solve the problem; 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... Discussion in 'Windows 10 Support' started by creeve4, Apr 26, 2017.

  1. creeve4 Win User

    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:

    Double-click to run .bat - Windows cannot find file [​IMG]


    Right-click and "Run as administrator":

    Double-click to run .bat - Windows cannot find file [​IMG]


    And from a command prompt:

    Double-click to run .bat - Windows cannot find file [​IMG]


    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?

    :)
     
    creeve4, Apr 26, 2017
    #1

  2. Double-click to run .bat or .cmd - "Windows cannot find..." the bat/cmd file.

    Recently (seemingly out of nowhere) my Windows 10 PC stopped running .bat and .cmd 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 files they also run. This is true for every bat and cmd 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:

    Double-click to run .bat - Windows cannot find file [​IMG]

    Right-click and "Run as administrator":

    Double-click to run .bat - Windows cannot find file [​IMG]

    And from a command prompt:

    Double-click to run .bat - Windows cannot find file [​IMG]

    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?
     
    ChrisReeve4, Apr 26, 2017
    #2
  3. Double-click to run .bat or .cmd - "Windows cannot find..." the bat/cmd file.

    We recommend starting your PC in safe mode and check if you're able to run these files. This method can help you troubleshoot issues with settings and drivers that can cause the concern you are experiencing. To do this, refer to this article: Start
    your PC in safe mode in Windows 10.


    Do advise us about the status of your issue so we can help you further.
     
    Dhavelyn Mer, Apr 26, 2017
    #3
  4. philc43 Win User

    Double-click to run .bat - Windows cannot find file

    philc43, Apr 26, 2017
    #4
  5. creeve4 Win User
    Unfortunately the .bat file restorer did not fix the problem. Thank you for the suggestion.
     
    creeve4, Apr 26, 2017
    #5
  6. philc43 Win User
    If you right click on the file, select properties and look in the details tab - does it show the correct file name, file type and folder path?
     
    philc43, Apr 26, 2017
    #6
  7. creeve4 Win User
    Yes, the properties are all correct. This happens with any and all bat files, not just this test file.
     
    creeve4, Apr 26, 2017
    #7
  8. dalchina New Member

    Double-click to run .bat - Windows cannot find file

    dalchina, Apr 26, 2017
    #8
  9. Change settings in User Account Control.
     
    Comp Cmndo, Apr 26, 2017
    #9
  10. creeve4 Win User
    I tried the proposed solutions in the technet thread, none fixed the problem.
    User Account Control is set to "Never Notify".

    I tried changing the file extension on my Test bat file to .cmd. The same issue occurs. It's not a file extension specific problem.
     
    creeve4, Apr 27, 2017
    #10
  11. Ztruker Win User
    When you right click on a bat file, what is the default action highlighted? Should be Open.

    Also check your path environment variable.
     
    Ztruker, Apr 27, 2017
    #11
  12. creeve4 Win User
    The default is Open

    PATH system variable:

    Double-click to run .bat - Windows cannot find file [​IMG]
     
    creeve4, Apr 27, 2017
    #12
  13. dalchina New Member

    Double-click to run .bat - Windows cannot find file

    dalchina, Apr 27, 2017
    #13
  14. Run CMD as admin and copy/paste, then restart.
    Code: sc config TrkWks start= auto net start TrkWks fsutil usn deletejournal /d /n c: chkdsk /scan[/quote]
     
    TairikuOkami, Apr 27, 2017
    #14
  15. Ztruker Win User
    Rats, that all looks good.

    Since cmd.exe should be executing the batch file, what does where cmd show you in a Command Prompt?
    Mine is:
    >where cmd
    C:\Windows\System32\cmd.exe


    Also, what is %systemroot% set to?
    Mine is:
    >echo %systemroot%
    C:\WINDOWS
     
    Ztruker, Apr 28, 2017
    #15
Thema:

Double-click to run .bat - Windows cannot find file

Loading...
  1. Double-click to run .bat - Windows cannot find file - Similar Threads - Double click run

  2. Is it safe to run this bat file?

    in AntiVirus, Firewalls and System Security
    Is it safe to run this bat file?: Spo I was wondering how to get sandbox on windows 10 home and I came across this forum saying that I could run this bat file to try and install it.Enable Windows Sandbox Feature in Windows 10 Home Edition Tutorials tenforums.comThe bat file I downloaded was not blocked by...
  3. Can't run .bat files

    in Windows 10 Support
    Can't run .bat files: I haven't run a .bat file in quite a while, so perhaps I unknowingly did something along the was that prompted this problem. I was trying to run Brinks "Reset_Notification_Area_Icons_Cache.bat", but instead the file opens in my text editor. I disassociated .bat in that text...
  4. Double-clicking .bat, .vbs, .reg do NOT work.

    in Windows 10 Support
    Double-clicking .bat, .vbs, .reg do NOT work.: This morning double-clicking .bat, .vbs, .reg etc do NOT work, although double-clicking all programs [ .exe and shortcuts ] do. I thought I would see if there is a quick fix for this. I have reset the default permissions etc etc. I don't want to spend too much time on this as...
  5. Cannot run an .exe file from .bat file in windows server 2016

    in Windows 10 Customization
    Cannot run an .exe file from .bat file in windows server 2016: I can not run .exe file from a .bat file, .bat file is dynamically create file which contains path to the .exe file. I can see the log of .bat file it prints echo statements but when It comes to execute .exe file it just skip. when I run .exe file manually it runs perfectly....
  6. Windows 10: bat files not being run when double clicked

    in Windows 10 Support
    Windows 10: bat files not being run when double clicked: Hi, somethings has been changed in my win10 64b pro (Microsoft Windows [Version 10.0.17763.134]) box, and now I have issues with bat files: When I double click on them, I get a cmd, empty that shows up for a couple of seconds, and then closes. The .bat is NOT run Of I open...
  7. Bat Files Won't Run?

    in Windows 10 Gaming
    Bat Files Won't Run?: Basically I'm installing BattlEye for a Steam game and I click the .bat file in the game's subfolder to download it (when I was prompted to download it I clicked no but now I practically need it for most servers), and I download the .bat from the main website and it also...
  8. Cannot run apps by double clicking from explorer

    in Windows 10 Software and Apps
    Cannot run apps by double clicking from explorer: I'm not sure when this started, just recently I believe - probably within the last two to three weeks. If I download something, go to that folder and double-click the app to run the install, nothing happens. If I leave the mouse icon there all you see is the arrow and the...
  9. Trouble running .bat files

    in Windows 10 Support
    Trouble running .bat files: Hi, I'm trying to run .bat files on Windows 10, but it tells me that "This app can't run on your PC". It doesn't matter what I use it for, .bat files just won't run anyway. Are .bat files no longer supported? (ran fine on Windows 7) Any workarounds? I'm no expert on...
  10. Can't Run .Bat Files

    in Windows 10 Support
    Can't Run .Bat Files: I try to run .bat files and the just run in note pad. There is no "open with" option. 48199