Problem with .exe file association

I ran the command "assoc"
Now I cannot run any .exe files. At first, whenever I tried to run a .exe file, i got the "Open with" dialogue. Then when I tried to open cmd to try to undo what I have done, I chose cmd.exe at the dialogue. After that, a new cmd opens up whenever I open any of the .exe files.

Help please. How can I recover my .exe file association without having to reinstall windows?

i was experimenting with the command and I did not know that I can break things that way.

Thanks in advance.


Essential Member
Microsoft Community Contributor

Can you do a Windows System Restore to an earlier restore point?
Or is there no way to start it?

You should be able to run Restore from your Windows disk if you can't start it inside Windows.
But you will need to have restore point that was made before you made the changes.

How to Use a System Repair Disc to Restore Windows 7 - For Dummies



Excellent Member
Microsoft Community Contributor
Try using

assoc .exe=exefile

You can type assoc /? to get info and switches for the command.

This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.