Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How do I restore .bat files as executables?

Recently I noticed that batch files (*.bat) now open using Notepad++ (NP++), rather than the file being executed. I don't know how this association to NP++ was created (I installed NP++ a long time ago, and I don't remember making the association myself).

Control Panel -> Default Programs -> Set Associations shows that .bat / BAT File / Notepad++

I tried following the instructions in How to delete a file association? but the association remains.

  • ftype yields batfile="%1" %*, which appears to be correct.
  • assoc yields nothing for .bat

I tried running assoc .bat=batfile but the assocation to NP++ still shows up in Control Panel, and batch files still open in NP++.

How can I restore batch files to their proper association so that they are run, instead of being opened in NP++?

--

UPDATE: After some more research, it appears I might have made this association through some variant of Right-click -> "Open With..."

share|improve this question

marked as duplicate by Karan, sudo, Canadian Luke, 8088, Dave Jan 16 '13 at 7:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 1 down vote accepted
  1. Download this .reg file.

  2. Save the .reg file to your desktop.

  3. Right click on the downloaded .reg file, and click on Merge.

  4. If prompted, click on Run, Yes (UAC), Yes, and OK.

  5. When finished, you can delete the downloaded .zip or .reg files on the desktop if you like.

  6. Log off and log on, or restart the computer to apply.

NOTES: If you wish to see what changes will be made by the REG file, then you can right click on the extracted REG file and click on Edit to see the default registry entries that will be added. REG files are just text files. The "Edit" function just opens them in Notepad.

If you are logged in a standard user account, then you will get a Cannot import type error. Just click on OK for it. This is normal since what cannot be imported can only be done so by an administrator account instead. It will still restore the default association of the file extension though.

Source: http://www.sevenforums.com/tutorials/19449-default-file-type-associations-restore.html

share|improve this answer

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