Page 1 of 2 12 LastLast
  1.    26 Apr 2017 #1
    Join Date : Jun 2015
    Posts : 12
    Windows 10

    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:
    Click image for larger version. 

Name:	Capture.PNG 
Views:	47 
Size:	8.5 KB 
ID:	132152

    Right-click and "Run as administrator":
    Click image for larger version. 

Name:	Capture 3.PNG 
Views:	47 
Size:	3.3 KB 
ID:	132154

    And from a command prompt:
    Click image for larger version. 

Name:	Capture 2.PNG 
Views:	47 
Size:	4.7 KB 
ID:	132153

    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?
      My ComputerSystem Spec
  2.    27 Apr 2017 #2
    Join Date : Nov 2015
    Posts : 2,859
    64bit Win 10 Pro ver 1709 Build 16299.64

    You could try the specific .bat file restorer provided by TenForums: Restore Default File Type Associations in Windows 10 - Windows 10 Customization Tutorials
      My ComputersSystem Spec
  3.    27 Apr 2017 #3
    Join Date : Jun 2015
    Posts : 12
    Windows 10
    Thread Starter

    Unfortunately the .bat file restorer did not fix the problem. Thank you for the suggestion.
      My ComputerSystem Spec
  4.    27 Apr 2017 #4
    Join Date : Nov 2015
    Posts : 2,859
    64bit Win 10 Pro ver 1709 Build 16299.64

    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?
      My ComputersSystem Spec
  5.    27 Apr 2017 #5
    Join Date : Jun 2015
    Posts : 12
    Windows 10
    Thread Starter

    Yes, the properties are all correct. This happens with any and all bat files, not just this test file.
      My ComputerSystem Spec
  6.    27 Apr 2017 #6
    Join Date : Jan 2015
    UK, Midlands
    Posts : 10,937
    Win 10 Pro (1703)

    Hi, this sounds as if it might be a permissions problem.

    Also see
    Cant run .bat (Batch Files)
      My ComputerSystem Spec
  7.    27 Apr 2017 #7
    Join Date : May 2016
    FL, USA
    Posts : 147
    Windows 10-Pro 64bit

    Change settings in User Account Control.
      My ComputerSystem Spec
  8.    27 Apr 2017 #8
    Join Date : Jun 2015
    Posts : 12
    Windows 10
    Thread Starter

    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.
      My ComputerSystem Spec
  9.    27 Apr 2017 #9
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,339
    Windows 10 Pro X64 16299.19

    When you right click on a bat file, what is the default action highlighted? Should be Open.

    Also check your path environment variable.
      My ComputersSystem Spec
  10.    27 Apr 2017 #10
    Join Date : Jun 2015
    Posts : 12
    Windows 10
    Thread Starter

    The default is Open

    PATH system variable:
    Click image for larger version. 

Name:	Capture 4.PNG 
Views:	20 
Size:	6.1 KB 
ID:	132328
      My ComputerSystem Spec

 
Page 1 of 2 12 LastLast


Similar Threads
Thread Forum
Single click acts as a double click 20% of the time
About a month ago my mouse started double clicking. Its random, like 20% of my clicks act as a double click. Tested with logitech g9, steelseries sensei and razer naga, so its definitely not a hw issue. Did clean win install with the lastest...
General Support
WINDOWS 10: Folders Window Opens Twice On Double Click
Hello, Every time i double a folder at times it opens the folder in a new window "twice" - this is becoming really annoying. Is there a way for me to resolve this? I've followed the basic troubleshooting guides found when searching around but it...
General Support
General Tips Open Items with Single-Click or Double-Click in Windows 10
How to Open Items with Single-Click or Double-Click in Windows 10 You can set Windows to open an item when you single-click/tap or double-click/tap on it. The single-click option allows you to open items (ex: files and folders) with a single...
Tutorials
Left Click & double tap not working in windows 10!
Hello, I use a HP laptop & since the last few days I am not able to open any files or click on something since the left (main) key & double tap on the mouse pad are not working! Although I am able to move the cursor/pointer over the touch pad & the...
General Support
Solved Double click on folders not working any more
Since the last update Win10 I cannot open folders with double click only right mouse click and then open folder. I have 3 times With Microsoft chatted but cannot solve this problem. Driver up to date, change mouse already, no hardware conflicts....
General Support
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:27.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums