Batch files won't run, open editor instead


  1. Posts : 17
    10 pro
       #1

    Batch files won't run, open editor instead


    Somehow (most likely my fault) .bat files have defaulted to opening my text editor (UltraEdit) instead of executing.

    I took all the file associations out of UltraEdit and re-started - no change

    I followed internet advice to remove

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.b*​at\UserChoice

    and re-started - no change

    I uninstalled UltraEdit and restarted - .bat's still try to open UltraEdit but can't find it.

    Help
      My Computer


  2. Posts : 12
    Windows 10 x64
       #2

    Try this :
    Delete any entries under the OpenWithList subkey
    or
    Take a backup of your regkey and delete the entire ".bat" key not only UserChoise subkey
      My Computer


  3. Posts : 5,442
    Windows 11 Home
       #3

    Code:
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat]  (if present: remove "UserChoice")
    [HKEY_CURRENT_USER\Software\Classes\.bat]  (if present: @ = "batfile")
    [HKEY_CURRENT_USER\SOFTWARE\Classes\batfile]  (if present)
    [HKEY_CURRENT_USER\SOFTWARE\Classes\batfile\shell]  (if present: @ = "open")
    [HKEY_CURRENT_USER\SOFTWARE\Classes\batfile\shell\open\command]  (if present: @ = "\"%1\" %*")
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.bat]  @ = "batfile"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell]  @ = "open"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\open\command]  @ = "\"%1\" %*"
    [HKEY_CLASSES_ROOT\.bat]  @ = "batfile"
    [HKEY_CLASSES_ROOT\batfile]
    [HKEY_CLASSES_ROOT\batfile\shell]  @ = "open" [HKEY_CLASSES_ROOT\batfile\shell\open\command]  @ = "\"%1\" %*"
    Source: How do I restore .bat files association with the system (make them run when double-clicked)?
      My Computer


  4. Posts : 17
    10 pro
    Thread Starter
       #4

    Sorry, what does "@ =" mean?

      My Computer


  5. Posts : 5,442
    Windows 11 Home
       #5

    Default, like this:

    [HKEY_CLASSES_ROOT\.bat] @ = "batfile"
    Attached Thumbnails Attached Thumbnails Batch files won't run, open editor instead-capture_06302016_224523.jpg  
      My Computer


  6. Posts : 13,896
    Win10 Version 22H2 Pro and Home, Win11 Pro and Home
       #6

    Since UltraEdit is a third-party software/program and free, I'd get rid of it and see if the file association for .bat gets restored or can be restorede.
      My Computers


  7. Posts : 17
    10 pro
    Thread Starter
       #7

    TairikuOkami said:
    Default, like this:

    [HKEY_CLASSES_ROOT\.bat] @ = "batfile"
    Got it, thanks!
      My Computer


  8. Posts : 17
    10 pro
    Thread Starter
       #8

    Berton said:
    Since UltraEdit is a third-party software/program and free, I'd get rid of it and see if the file association for .bat gets restored or can be restorede.
    If you read the post you'll see I already did all that.
      My Computer


  9. Posts : 17
    10 pro
    Thread Starter
       #9

    Fixed! Special thanks to TairikuOkami for the list, I think the problem was [HKEY_CURRENT_USER\Software\Classes\.bat which was the only one with a link to UltraEdit
      My Computer


 

  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 16:14.
Find Us




Windows 10 Forums