I experienced a strange issue after rebooting my computer. Now, whenever I try to open any EXE or LNK files, I'm just getting a prompt that asks, 'How do you want to open this file?' I've seen various solutions online that recommend using the registry editor or command prompt, but since those are both executable files, I can't open them either. I attempted to boot into a command prompt using restart options, and I accessed the registry editor from there, but nothing has worked so far. To make matters worse, the startup settings menu doesn't respond to my key presses, so I can't even access safe mode. I'm hoping to find a fix before resorting to reinstalling Windows. Any advice?
2 Answers
Before you think about reinstalling Windows completely, try these steps if you can get to a command prompt: Press Windows + R, or open the command prompt through the task manager if needed. Use this script to reset the associations for .exe and .lnk files. It should help restore the defaults and restart Explorer for you. Here's what you'll need to run:
```cmd
assoc .exe=exefile
ftype exefile="%1" %%*
reg add "HKCR.exe" /ve /d "exefile" /f
reg add "HKCRexefile" /ve /d "Application" /f
reg add "HKCRexefileshellopencommand" /ve /d ""%%1" %%*" /f
reg add "HKCRexefileshellopencommand" /v "IsolatedCommand" /d ""%%1" %%*" /f
reg add "HKCRexefileshellrunascommand" /ve /d ""%%1" %%*" /f
reg add "HKCRexefileshellrunascommand" /v "IsolatedCommand" /d ""%%1" %%*" /f
```
You’ll also want to fix the .lnk associations similarly. If these commands don’t work, it might be time to consider reinstalling, but try this first!
I get that a full reinstall seems daunting, especially if you’ve set up everything with a custom XML file. If you can back up your files, that’s definitely a good start. This way, if you end up needing to do a clean install, at least your personal data would be safe. It's worth trying the command prompt fix someone suggested before taking the plunge into a reinstall, though. You could save yourself a huge headache!

Thanks for the tip! I really don’t want to go through all that trouble if I can avoid it.