Can't Run .Bat Files


  1. Posts : 2
    windows 10
       #1

    Can't Run .Bat Files


    I try to run .bat files and the just run in note pad. There is no "open with" option.
      My Computer


  2. Posts : 13,895
    Win10 Version 22H2 Pro and Home, Win11 Pro and Home
       #2

    vekben said:
    I try to run .bat files and the just run in note pad. There is no "open with" option.
    Mind posting one .bat file for testing? If it won't post just post the .txt version. I just created a simple .bat file called Time.bat, consists of just 2 lines, date and time, then saved it. Double-clicking ran it. More complicated .bat files can be problematic. Then to be funny I added DIR /O/S to it then a last line with Pause, with a lot of data on the drive it runs for awhile.
      My Computers


  3. Posts : 2
    windows 10
    Thread Starter
       #3

    I tried different bat files its not something wrong with the bat file. Its windows not knowing what to do with it. I tried going in to regedit to delete the .bat user choice but it still just just opens it in note pad.

      My Computer


  4. Posts : 1,983
    Windows 10 x86 14383 Insider Pro and Core 10240
       #4

    use the .cmd extension instead of .bat
      My Computers


  5. Posts : 13,895
    Win10 Version 22H2 Pro and Home, Win11 Pro and Home
       #5

    vekben said:
    I tried different bat files its not something wrong with the bat file. Its windows not knowing what to do with it. I tried going in to regedit to delete the .bat user choice but it still just just opens it in note pad.

    It's always good to try applications on a different computer or two to see if it is the file or if the problem is with Windows.
    Have you tried Control Panel, Default Programs? This is what mine is:
    Attachment 76390
      My Computers


  6. Posts : 42,734
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #6

    Hi, have a look here:
    Default File Type Associations - Restore in Windows 10 - Windows 10 Forums
    With that page open CTRL F, then type bat <Return> to find 'bat'- you be able to download a reg file.
    Download it, rt click, and click Merge.
      My Computers


 

  Related Discussions
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 04:38.
Find Us




Windows 10 Forums