Lost .bat file association
I have made the unfortunate mistake of associating .bat file extension to a notepad utility. This is no good as batch files do not run as they should but open up in the notpead utiltiy to be edited. How can i reassociated the .bat file extension to the appropriate windows function to get it to run as it should?
September 8th, 2009 2:38am

There is no option with batch files to change the default opener from the file itself so how and where did you change the default program in the first place? I'm guessing you went to program access and defaults in control panel where the default program is listed as unknown.
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 2:51am

Try the following, as a .reg file: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.bat] @="batfile" [HKEY_CLASSES_ROOT\.bat\PersistentHandler] @="{5e941d80-bf96-11cd-b579-08002b30bfeb}" [HKEY_CLASSES_ROOT\batfile\shell\open\command] @="\"%1\" %*"
September 8th, 2009 3:14am

You must take ownership of this restricted registry key. Open regedit and navigate to the key you see here.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.BAT\UserChoice----------------------------------------------------------------------------------------------------------------------Delete the key named"user choice" and the association with note pad will end restoring it to it's original state.
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 3:24am

Changing the reg entry:Hkey_Local_Machine\Software\Classes\Regfile\Command\Openfrom regedit.exe to notepad.exe looks like a good option hehehe (just a lil parenteses)PS: dont remember if thats the exact path but looks like that,it just came out off the top of my head...All my best,RR
September 8th, 2009 4:49am

Windows 7 does not have the option to disasociate file types that canbeassigned a program only from the control panel and not from the file itself. When you associate this type of file it createsthis protected key:"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.BAT\UserChoice"and for some reason there is no option from the user interface even in the control panel to remove this key in the form of a selectable button thatwould saysomething similar to "disasociate all programs from this file type", no- instead it must be done manually through the registry editor. I can not remember if this was the case for windows xp.
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 7:34am

Changing the reg entry:Hkey_Local_Machine\Software\Classes\Regfile\Command\Openfrom regedit.exe to notepad.exe looks like a good option hehehe (just a lil parenteses)PS: dont remember if thats the exact path but looks like that,it just came out off the top of my head...All my best,RR We appreciate the humer but please be carfull that it is not misconstrued as an actual suggestion and my apologies if this is a real suggestion.Thanks again, Mate!
September 8th, 2009 8:42am

Hi HorsHack,I need a translator plix pl0x lolgot 70 % of what you said!w8 a minute lemme google it and brb..Humer(tot it was written Humor nevermind),misconstrued(got it after google it lol)Ok that is actually a real suggestion ,i was not playing with it ,changing that it basically changes the Merge behaviour of windows registry...so after altering that entry when you click on .reg files they open in text mode and wont merge it,this is a security measure to avoid registry silent installations(of course u can even via GPO prevent any registry tools from opening),so if you want to merge some entries,all u need to do is switch back to regedit.exe and afterwards get back to notepad.exe just to keep u safer....so i was not playing when i suggested that ^^NOTE: changing that wont prevent registry from opening,just prevents .reg files from merging,to prevent windows registry from runnning just do it via Group policy object and then when u want to open windows registry just turn it off ,make the desired changes then enable the prevention again ^^i think those are some reasonable advices so if you guys want to take it feel free !!!All my best,RR
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 9:16pm

Changing the reg entry:Hkey_Local_Machine\Software\Classes\Regfile\Command\Openfrom regedit.exe to notepad.exe looks like a good option hehehe (just a lil parenteses)PS: dont remember if thats the exact path but looks like that,it just came out off the top of my head...All my best,RR Lol. Yeah I did that once, only I changed it to Wordpad.
September 8th, 2009 9:58pm

Hehe :Daint that nice?i have to admit i love changing the registry,of course not in a reckless way(did i spell it right?)Regards,RR
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 10:25pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics