SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict suzkaw's Avatar
    Join Date
    Apr 2002
    Location
    North Carolina
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Force .bat files to open in default program.

    Hi,
    I am having some problems. I purchased a program and it needs to run a .bat file however when I try to run it windows asks me what program I would like to open it with. How do I force it to default to whatever it is supposed to be?
    Thanks Eric.

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    goto>start>control panel>folder options>click the file type tab at the top and go through the list til you see .bat and choose the program you wish.

    Hope this helps.

    Later
    Johnny

  3. #3
    SitePoint Addict suzkaw's Avatar
    Join Date
    Apr 2002
    Location
    North Carolina
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I couldn't find .bat file extension listed there. And also what program would I need to set this to open with? I just want the default with windows.
    Thanks Eric.

  4. #4
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    On that dialog box where the list of file types are there is a button named "new" click that and type in the extension then click ok and as far as what program is the default for a batch file, I don't know for sure.

    Here is a link: http://www.webopedia.com/TERM/B/batch_file.html

    Hope you find a solution.

    Johnny

  5. #5
    SitePoint Wizard silver trophy rushiku's Avatar
    Join Date
    Dec 2003
    Location
    A van down by the river
    Posts
    2,056
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    if you're comfortable with editing the registry, you might try this:

    - open regedit
    - do a search for .asm (I notice it has the same handler as my .bat)
    - write down the value for the (default) key
    - search for .bat, compare, does it have the same information as .asm?
    - if not, right-click .bat, chose add key, name it PersistantHandler (skip if this is already there)
    - in the key you just added, add a String, name it (default) and give it the same value that appears in the .asm information (I recommend a copy and paste to avoid typos)
    - if there are other keys in .bat, export them, then delete them (you can double click the exports (.reg files) later to restore them if needed)
    - reboot and test

  6. #6
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why not just run the bat from the command line?
    Aaron Brazell
    Technosailor




Bookmarks

Posting Permissions

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