Results 1 to 11 of 11
  1. #1
    New Lounger
    Join Date
    May 2011
    Location
    Seattle Area, USA
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Need to reset default program for .bat files

    Yikes! Just spaced out and changed program association for .bat files (in Control Panel\All Control Panel Items\Default Programs\Set Associations) and now can't launch batch scripts. It originally showed Current Default as "Unknown application" so I have no idea what launched it.

    Can anyone tell me how to fix this? TIA, Stephanie

  2. #2
    Silver Lounger
    Join Date
    Mar 2014
    Location
    Forever West
    Posts
    2,137
    Thanks
    0
    Thanked 266 Times in 255 Posts
    Nothing launched .bat files, they are used to launch programs from the Command line [Command Prompt] window. They are simple text files saved as .bat format, can be created/edited in Notepad.
    http://www.vectorsite.net/tsbatch.html

  3. #3
    New Lounger
    Join Date
    May 2011
    Location
    Seattle Area, USA
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Berton View Post
    Nothing launched .bat files, they are used to launch programs from the Command line [Command Prompt] window. They are simple text files saved as .bat format, can be created/edited in Notepad.
    http://www.vectorsite.net/tsbatch.html
    Thanks Berton. Guess I wasn't clear. When you double-click a .bat, it "launches" (runs) the batch script. My change caused the double-click to open the file in my editor instead of running the commands. Anyway, I posted prematurely. A search showed I needed to change the registry to get back to normal behavior, as explained here:
    http://superuser.com/questions/53948...as-executables

    Whew! fixed now.

  4. #4
    Silver Lounger
    Join Date
    Mar 2014
    Location
    Forever West
    Posts
    2,137
    Thanks
    0
    Thanked 266 Times in 255 Posts
    Remembering back to my DOS days, when I had a .bat file as desired I would use a small program called BAT2EXEC to convert/compile the .bat file as an .exe/executable file, difficult for others to change. Don't know it that is still available but may be something on the 'net

  5. #5
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    near Boulder, Colorado, USA
    Posts
    112
    Thanks
    22
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by Berton View Post
    Remembering back to my DOS days, when I had a .bat file as desired I would use a small program called BAT2EXEC to convert/compile the .bat file as an .exe/executable file, difficult for others to change. Don't know it that is still available but may be something on the 'net
    Google "bat2exec" and you will get several sources...

  6. #6
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,472
    Thanks
    34
    Thanked 197 Times in 177 Posts
    In my experience, bat2exe never worked properly, except for the simplest BATch files.
    BATcher

    "The trouble with quotes on the internet is that you can never know if they are genuine."
    Abraham Lincoln
    

  7. #7
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,520
    Thanks
    54
    Thanked 1,038 Times in 966 Posts
    Reverting to a previous restore point may fix it, otherwise try this thread.
    http://social.technet.microsoft.com/...w7itprogeneral

    cheers, Paul

  8. #8
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,802
    Thanks
    27
    Thanked 435 Times in 345 Posts
    I don't remember the version of DOS (it was around the time of Windows 3) there was "Exe2bin", a native DOS compiler that would turn a batch file into an executable. I wrote a batch file to move files from one directory to another (not just copy, but copy to the new and erase from the old) and compiled it using Exe2bin after a few test runs as a batch file. It worked great, and speeded up the process as well.
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"ŚCaptain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."ŚM.O. Johns "Experience is what you get when you're looking for something else."ŚSir Thomas Robert Deware.
    Unleash Windows

  9. #9
    Silver Lounger
    Join Date
    Mar 2014
    Location
    Forever West
    Posts
    2,137
    Thanks
    0
    Thanked 266 Times in 255 Posts
    I just checked my MS-DOS disks and the last version I have with exe2bin is 5.0, does not appear on disks for MS-DOS 6, 6.2, 6.21 or 6.22 [the last].

  10. #10
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,885
    Thanks
    5
    Thanked 1,099 Times in 965 Posts
    Download and then merge the .reg file in the bat file section at Restore Default Windows 7 File Extension Type Associations.

    Joe

  11. #11
    WS Lounge VIP Coochin's Avatar
    Join Date
    Jun 2014
    Location
    Queensland, Australia
    Posts
    2,315
    Thanks
    34
    Thanked 337 Times in 292 Posts
    Quote Originally Posted by sjoy View Post
    Yikes! Just spaced out and changed program association for .bat files (in Control Panel\All Control Panel Items\Default Programs\Set Associations) and now can't launch batch scripts. It originally showed Current Default as "Unknown application" so I have no idea what launched it.

    Can anyone tell me how to fix this? TIA, Stephanie
    Batch files (.bat) should run via cmd.exe (built in Windows command processor). However, you might need to right-click the .bat file and click (left) "Run as Administrator" for it to work in Win7.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •