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,072
    Thanks
    0
    Thanked 259 Times in 248 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,072
    Thanks
    0
    Thanked 259 Times in 248 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,414
    Thanks
    33
    Thanked 195 Times in 175 Posts
    In my experience, bat2exe never worked properly, except for the simplest BATch files.
    BATcher

    Time prevents everything happening all at once...

  7. #7
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,179
    Thanks
    47
    Thanked 983 Times in 913 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,760
    Thanks
    26
    Thanked 424 Times in 338 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,072
    Thanks
    0
    Thanked 259 Times in 248 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,573
    Thanks
    5
    Thanked 1,057 Times in 926 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,153
    Thanks
    31
    Thanked 306 Times in 266 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
  •