Incorrect File association for .exe files in Windows

file extension

I accidentally chose 'open with this program this kind of file' for .exe files. Now, all the files with a .exe extension open with a particular program. My computer does not have an earlier restore point so I can't restore to an earlier time. How to revert my .exe extensions with appropriate applications?

Best Answer

First off, download this link, which is a registry file. Hopefully, you can still open archives with Windows Explorer. Inside, you'll find a .REG file (contents below for XP).

Then, start Task Manager. Press Ctrl+Shift+Escape to do so. Click File, then Ctrl while clicking on New Process. This will open the Command Prompt. Import the registry file by typing REG IMPORT <filename>. If you are not in the same folder as where that registry file is, include the full path.

If you need to create the REG file from scratch, open Notepad (or another PLAIN TEXT editor), copy and paste the code below, then save it with a .REG extension.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.exe]
@="exefile"
"Content Type"="application/x-msdownload"

[HKEY_CLASSES_ROOT\.exe\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\exefile]
@="Application"
"EditFlags"=hex:38,07,00,00
"TileInfo"="prop:FileDescription;Company;FileVersion"
"InfoTip"="prop:FileDescription;Company;FileVersion;Create;Size"

[HKEY_CLASSES_ROOT\exefile\DefaultIcon]
@="%1"

[HKEY_CLASSES_ROOT\exefile\shell]

[HKEY_CLASSES_ROOT\exefile\shell\open]
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\exefile\shell\open\command]
@="\"%1\" %*"

[HKEY_CLASSES_ROOT\exefile\shell\runas]

[HKEY_CLASSES_ROOT\exefile\shell\runas\command]
@="\"%1\" %*"

[HKEY_CLASSES_ROOT\exefile\shellex]

[HKEY_CLASSES_ROOT\exefile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"

[HKEY_CLASSES_ROOT\exefile\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\exefile\shellex\PropertySheetHandlers\PEAnalyser]
@="{09A63660-16F9-11d0-B1DF-004F56001CA7}"

[HKEY_CLASSES_ROOT\exefile\shellex\PropertySheetHandlers\PifProps]
@="{86F19A00-42A0-1069-A2E9-08002B30309D}"

[HKEY_CLASSES_ROOT\exefile\shellex\PropertySheetHandlers\ShimLayer Property Page]
@="{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}"

If you're running Windows Vista or Seven, then Microsoft has other steps for you:

  1. Click the Start button and type regedit in the Search box
  2. Right-click Regedit.exe in the returned list and click Run as administrator
  3. Browse to the following registry key:
    HKEY_CLASSES_ROOT.exe
  4. With .exe selected, right-click (Default) and click Modify…. Change the Value data to exefile
  5. Browse to and then click on the following registry key:
    HKEY_CLASSES_ROOT\exefile
  6. With exefileselected, right-click (Default) and click Modify…
  7. Change the Value data: to "%1" %*
  8. Browse to and then click on the following registry key:
    KEY_CLASSES_ROOT\exefile\shell\open
  9. With openselected, right-click (Default) and click Modify…
  10. Change the Value data: to "%1" %*
  11. Close the Registry Editor and restart your PC