A client of ours, a small business running a number of Dental practices in and around Bracknell, had a PC crash with overnight and even when the boot problems were solved, it was left with the inability to start the command prompt (cmd.exe), giving the error “ The application was unable to start correctly (0xC0000142)”.
There are many supposed answers on the internet forums with several on the Microsoft forums but usually involving “you need to run SFC /scannow” which of course is impossible in Windows if you have this problem since it only ruins from a command prompt.
The answer is actually pretty simple:
- Reboot your PC, tapping the F8 button until you get to the boot options menu
- Select “Repair Your Computer” if available (if it’s not then you’ll need to boot from your Windows 7 disk and select repair computer and follow on from there.
- When you’ve got to System Recovery Options, select Command Prompt
- This is where you want to run SFC /scannow…however there is a little trick you need to be aware of here. If you run that command, it will run fine but report that it found nothing wrong. That is because you are in a boot environment on the X: which is a RAMdisk. So all you’re doing is checking that, which is not the system you’re trying to fix. Your system is on the D: so run the following command instead: SFC /SCANNOW /OFFBOOTDIR=D:\ /OFFWINDIR=D:\WINDOWS (note that there is a single space between the \ and / )
- This will scan the system files and replace any it notices as being corrupt, the wrong version or missing. In most cases this will fix the system.
- Reboot and assuming you get into Windows now, fire up a command prompt with admin access and run SFC /scannow for good measure. It’s also a good idea to run chkdsk /f on the c: in case it was file corruption that caused your problems in the first place.
Hopefully this will have solved problems with cmd.exe and error 0xC0000142.