Last updated: 30 October 2026
If every .exe file stops opening, or double-clicking a program shows an error or opens the wrong application, the .exe file association or the command that Windows uses to launch programs has been changed. Malware and third-party tools are the usual cause. This guide shows how to confirm the cause, repair it with the registry, and clean up afterwards.
- Cause: Microsoft says corrupt registry settings, a third-party product or a virus can change how .exe files run.
- Repair: set the (Default) value of
HKEY_CLASSES_ROOT\exefile\shell\open\commandto"%1" %*. - Then: run a full malware scan, because the change is often made by malware.
In this guide
Symptoms
- Double-clicking a program shows "Access Denied", a runtime error, or "Windows cannot open this file".
- Every .exe opens the same unrelated program.
- Programs still run when started from the command line or from Task Manager (File, Run new task).
Scan first
Because malware commonly breaks this setting, scan before you repair, or the change may return. Use Microsoft Defender Antivirus (Windows Security, Virus and threat protection, Scan options, Full scan) or boot into Safe Mode with Networking and run your preferred scanner.
Repair the association
Back up the registry key first: in Registry Editor, right-click the key and choose Export.
- Open Task Manager (Ctrl+Shift+Esc), choose File, Run new task, type
regeditand tick "Create this task with administrative privileges". This starts Registry Editor even when .exe files will not open from Explorer. On Windows XP era systems Microsoft instead copies regedit.exe to regedit.com and starts that. - Go to
HKEY_CLASSES_ROOT\.exeand check that the (Default) value isexefile. - Go to
HKEY_CLASSES_ROOT\exefile\shell\open\command. - Double-click the (Default) value, delete the current data, and enter exactly:
"%1" %*
- Close Registry Editor and try to open a program. Restart if needed.
After the repair
- Run a second scan with a different tool to catch anything left behind.
- Check Startup apps and scheduled tasks for entries you do not recognise.
- Run
sfc /scannowfrom an elevated Command Prompt, thenDISM /Online /Cleanup-Image /RestoreHealthif system files are damaged. - If it keeps happening, use System Restore to a point before the problem started, or reset Windows.
FAQ
Why does this happen?
Per Microsoft: corrupt registry settings, or a third-party product or virus, can change the default configuration for running EXE files.
Is it safe to edit the registry?
Yes if you export the key first and change only the value shown. A wrong edit elsewhere can break Windows.
The repair does not stick. What now?
The cause is probably still active. Scan again in Safe Mode and remove the offending program or malware, then repeat the repair.
Sources
- Microsoft Learn: Can't open EXE files
- Microsoft: The file may start a different program when you run an .exe file
More on this site: Security guides · All IT guides
Thank you for your message.