Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to change which programs opened and edited my batch files in Windows 7. Now I want to change it all back to default, but my computer hasn't made any restore points.

Can someone tell me the registry keys/values for:

share|improve this question

migrated from Jun 30 '11 at 19:37

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

Here are the entire contents of the HKEY_CLASSES_ROOT\batfile key. Copy-and-Paste to a text file and save as a .REG.

Windows Registry Editor Version 5.00

@="Windows Batch File"






@="\"%1\" %*"













[HKEY_CLASSES_ROOT\batfile\ShellEx\PropertySheetHandlers\ShimLayer Property Page]

share|improve this answer
I tried this and similar answers but it still didn't work. I'm on Win8.1 and I found there's another reg key that doesn't get mentioned: HKEY_CURRENT_USER\Software\Microsoft\Windows\Roaming\OpenWith\FileExts. Once I deleted the .bat key from there .bat files would launch correctly on a double click again. The icon is still set to Notepad++, maybe a restart will solve that but at least they run correctly now. – Kioshiki Sep 27 '15 at 6:42
A restart did restore the icon after I removed the .bat key from the Roaming version of the FileExts key. – Kioshiki Sep 27 '15 at 6:47

Ouch. When tinkering with the registry I'd always back it up first.

However, these are the two entires on my laptop, Windows 7 Professional, 32-Bit. enter image description here

share|improve this answer
Thanks. I changed them back, but for some reason, the Edit option is missing when I right-click batch files. – Matt R. Johnson Jun 30 '11 at 19:52
Did you reboot? – Moab Jun 30 '11 at 20:03
Yeah, "edit" isn't showing up. – Matt R. Johnson Jun 30 '11 at 20:16
@Matt looks like something else has gone weird then...what did you change the batch file to open with? – tombull89 Jul 1 '11 at 8:14

Backup the registry key beofre changing. as there is no restore point. The backed up key can usually be easliy recovered unless the change "bricks' the system

As noted by @tombull89, the keys shown are what I have as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.