First CCcleaner is useless
When I develop with C++ I use system() which is the standard way to spawn a new program.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I tried to install a .exe file and received the "ShellExecuteEx Failed; code 2". Then noticed it seems to be all .exe files. When trying to run as administrator I get "Windows cannot find '_______'. Make sure you typed the name correctly, and then try again"
I also cannot:
open task manager
open regedit
run command prompt as administrator
open system restore
open device manager
This is Windows 10 64bit
I have tried:
Any help would be majorly appreciated! Been trying to solve this for hours now.
First CCcleaner is useless
When I develop with C++ I use system() which is the standard way to spawn a new program.
Hello, Jamie barnes
Thank you for your feedback. I understand that you are having trouble executing files. Here are some troubleshooting solutions:
Hold down the power button on your computer until it shuts down completely.
Press the power button again to start your computer.
When Windows starts loading (you see spinning dots or the Windows logo), immediately hold down the power button again to force your computer to shut down.
Repeat this process 2 to 3 times. Windows will detect the startup failure and automatically enter the blue “Automatic Repair” or “Recovery” screen.
Once in the recovery environment, you will see a screen titled “Please select an option.”
On the “Please select an option” screen, choose ‘Troubleshoot’ -> “Advanced options.”
You now have several available tools. Please try them in the following order:
In “Advanced Options,” select “Command Prompt.”
In the black window that opens, type notepad and press Enter. This will open Notepad.
In Notepad, click “File” -> “Open.”
In the “Open” dialog box, change the “File type” from .txt to “All files (.)”.
Now, use the navigation pane on the left to locate your system drive (typically the C: drive, but the drive letter may change in the recovery environment; you can determine this by the folder contents—look for the drive containing the Windows and Users folders).
Navigate to the C:\Windows directory and locate a file named regedit.exe. Right-click it and select “Run” or “Open.” This should launch the Registry Editor.
If regedit.exe launches successfully, we can import a repair file. Return to the command prompt window and enter the following commands to create a repair file. Enter each line and press Enter:
echo Windows Registry Editor Version 5.00 > C:\fix.reg
echo. >> C:\fix.reg
echo [HKEY_CLASSES_ROOT\.exe] >> C:\fix.reg
echo @=“exefile” >> C:\fix.reg
echo “Content Type”=“application/x-msdownload” >> C:\fix.reg
echo. >> C:\fix.reg
echo [HKEY_CLASSES_ROOT\exefile] >> C:\fix.reg
echo @=“Application” >> C:\fix.reg
echo “EditFlags”=hex:38,07,00,00 >> C:\fix.reg
echo “FriendlyTypeName”=“@shell32.dll,-10156” >> C:\fix.reg
echo. >> C:\fix.reg
echo [HKEY_CLASSES_ROOT\exefile\shell\open] >> C:\fix.reg
echo @=“” >> C:\fix.reg
echo. >> C:\fix.reg
echo [HKEY_CLASSES_ROOT\exefile\shell\open\command] >> C:\fix.reg
echo @=“\”%1\“ %*” >> C:\fix.reg
Now, import the newly created registry file. At the command prompt, enter:
reg import C:\fix.reg
You should see a message indicating the operation was successful. Close the command prompt and select “Continue” or “Exit and continue to Windows 10.”
If all of the above methods fail, it indicates that the system is severely damaged. We recommend reinstalling Windows using a USB installation medium.
How to make clean install of Windows 11 - ARTICLE - Microsoft Q&A
For file backup, you can refer to the following link:
[Article] Rescue Files when Windows Won't Start - Microsoft Q&A
I look forward to your feedback.
Best Regards,
Kai Ho | Microsoft Q&A Support Specialist
Hey Kai thanks for the help, I tried your suggestion so far but could not import the registry file, I'm not sure what I did wrong. If the image hasn't attached properly the error I got was The specified file is not a registry file. Apologies I'm typing on my phone while in repair