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

Page 2 of 2 FirstFirst 12
  1.    28 Apr 2017 #11

    Not uncommon, apparently:
    Double Clicking Batch File Windows cannot find file - Super User

    I tried one logged in as a standard user - location not in system path- worked ok when double clicked.
    Here's how to reset it if associated with e.g. Notepad (which isn't your problem, but for interest)
    - and note 'batfix' - which may be similar to the one from the Tutorial:
    Cant run .bat (Batch Files)

      My ComputerSystem Spec


  2. Posts : 3,149
    10.5 Home 1803 x64
       28 Apr 2017 #12

    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
      My ComputerSystem Spec


  3. Posts : 5,684
    Windows 10 Pro X64 16299.192
       28 Apr 2017 #13

    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
      My ComputersSystem Spec

  4.    29 Apr 2017 #14

    TairikuOkami said: View Post
    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
    Ztruker said: View Post
    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
    Below are the results of these commands:
    Code:
    C:\Windows\system32>sc config TRkWks start= auto[SC] ChangeServiceConfig SUCCESS
    
    C:\Windows\system32>net start TrkWks
    The requested service has already been started.
    More help is available by typing NET HELPMSG 2182.
    
    C:\Windows\system32>fsutil usn deletejournal /d /n c:
    
    C:\Windows\system32>chkdsk /scan
    The type of the file system is NTFS.
    Volume label is Win 10.
    
    Stage 1: Examining basic file system structure ...
      425984 file records processed.
    File verification completed.
      10186 large file records processed.
      0 bad file records processed.
    
    Stage 2: Examining file name linkage ...
      558648 index entries processed.
    Index verification completed.
      0 unindexed files scanned.
      0 unindexed files recovered to lost and found.
    
    Stage 3: Examining security descriptors ...
    Security descriptor verification completed.
      66333 data files processed.
    CHKDSK is verifying Usn Journal...
      5024 USN bytes processed.
    Usn Journal verification completed.
    
    Windows has scanned the file system and found no problems.
    No further action is required.
    
     249478143 KB total disk space.
     108035960 KB in 296481 files.
        187504 KB in 66334 indexes.
             0 KB in bad sectors.
        502603 KB in use by the system.
         65536 KB occupied by the log file.
     140752076 KB available on disk.
    
          4096 bytes in each allocation unit.
      62369535 total allocation units on disk.
      35188019 allocation units available on disk.
    Code:
    >where cmd
    C:\Windows\System32\cmd.exe
    
    >echo %systemroot%
    C:\Windows

    The problem persists.
      My ComputerSystem Spec

  5.    29 Apr 2017 #15

    The Creators updated installed moments ago.
    bat and cmd files are now working properly again.
      My ComputerSystem Spec

  6.    29 Apr 2017 #16

    Reasonable outcome. Should this happen again, and you can't use a restore point, an in-place upgrade repair install should achieve the same. With the CU around now, a 1607 in-place upgrade repair install of a 1607 installation isn't necessarily the first choice.
      My ComputerSystem Spec


  7. Posts : 5,684
    Windows 10 Pro X64 16299.192
       29 Apr 2017 #17

    creeve4 said: View Post
    The Creators updated installed moments ago.
    bat and cmd files are now working properly again.
    No no no ... back it out so we can work on this some more!!! JUST KIDDING
    Sure wish we knew what was wrong. Oh well, as long as it's working for you now.
      My ComputersSystem Spec

  •    29 Apr 2017 #18

    Ztruker said: View Post
    No no no ... back it out so we can work on this some more!!! JUST KIDDING
    Sure wish we knew what was wrong. Oh well, as long as it's working for you now.
    My thoughts exactly! I was tempted to roll it back just so I could figure out what was wrong.
      My ComputerSystem Spec


  •  
    Page 2 of 2 FirstFirst 12

    Related Threads
    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...
    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....
    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...
    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...
    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...
    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 12:03.
    Find Us