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. ModUser's Avatar
    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. TairikuOkami's Avatar
    Posts : 4,116
    Home 2004 x64 10.0.19041.264
       #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. TairikuOkami's Avatar
    Posts : 4,116
    Home 2004 x64 10.0.19041.264
       #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. Berton's Avatar
    Posts : 8,079
    Win10 Home and Pro, Win10 Insider Preview, WinXP Home Premium, Linux Mint, Win7 Pro
       #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 Computer



  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 Threads
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 22:25.
Find Us




Windows 10 Forums