Common commands to Repair Broken or Unbootable Windows XP / Vista / 7 without system Re-install

Monday, 22nd October 2012

Common commands to repair broken unbootable Windows XP 7 and Vista, the famous genuine great! mfc command :)
If you have severe problems with Windows 7 / Vista / XP whatever and you don’t want to re-install. It is handy to know about the existence of few commands, which can help you fix your basis Windows system without re-install. This commands are not to fix 100% of messed up Windows installs but in most cases I know, they either improved the state of the system or fixed it completely, so here are commands:

1. Change permissions of C:boot.ini and delete it

Many Viruses install via standard Windows boot.ini file and change permissions of the file to make it hard to delete by programs and by
Administrator user. To solve that in Windows Safe Mode (without networking) exec:


C:> COPY boot.ini boot.bak
C:> ATTRIB -RSH C:boot.ini
C:> DEL boot.ini

-RSH ATTRIB cmd options instruct it to remove Read Only, System and Hidden flags from boot.ini.

2. Re-build boot.ini and other essential Win boot components


C:> CD WINDOWS
C:WINDOWS> BOOTCFG /REBUILD

BOOTCFG /Rebuild is a very important for recovering. The command will do complete evaluation with diagnostic tests trying to replace / repair whatever files are preventing OS boot.

3. Fix problems with Unbootable Windows Systems

If the system is completely unbootable you need to use the Windows Install (Setup) CDRecovery Console and in first boot up (blue screen), type R key to enter recovery console. There is option of automated recovery console but for me Automated System Recovery – ASR, never worked.
Once in Recovery Console to repair broken Windows boot up (fix winboot loader):


C:WINDOWS> BOOTCFG /Rebuild
C:WINDOWS> CHKDSK /R /F
C:WINDOWS> FIXBOOT

You should already know from the MS-DOS, DR-DOS times CHKDSK (Check Disk) is thanksfully still on every next Windows release. As CHKDSK does a hard drive check for irregularities and BAD Blocks (depending on the size of HDD) it takes time usually from 30 minutes to 1 hour.
4. System File Checker (SFC) command – restore basis .DLLs and others to Setup CD (install) originals


C:WINDOWS> SFC /SCANNOW

SFC – has been useful in many, many Windows installs, I fixed it is really precious cmd. It does check the system essential (DLL – Dynamic Loadable Libraries) and matches them against a clean working copy which was copied on the system by Windows Install (CD) SETUP program. If some of the primary win .EXE or .DLL files checksums are not matching, the file is substituted with a clean (working) copy of the Install CD original ones. Some Viruses and Spyware might change those original (clean) binary files placed by Windows during install time. So intelligent Virus progs are very rare so in lets say 90% of broken Windows installs SFC /SCANNOW solves problems with main win files 🙂

If you have doubt that those binaries which SFC matches with are changed, you can always use a Setup Install CD with same Service Pack version as installed on the host. To restore main Windows binaries and libs using the external recovery CD use:


C:WINDOWS> sfc /offbootdir=c: /offwindir=c:windows /scannow

This tutorial should solve also all kind of start-up errors like:


Windows could not start because the following file is missing or corrupt:
\WINDOWS\SYSTEM32\CONFIG\SYSTEM


You can attempt to repair this file by starting Windows Setup
using the original Setup CD-ROM.
Select ‘R’ at the first screen to start repair.

Windows NT could not start because the below file is missing or corrupt:
X:\WINNT\System32\Ntoskrnl.exe


Windows NT could not start because the below file is missing or corrupt:
X:\WINNT\System32\HAL.dll


NTLDR is Missing
Press any key to restart


Invalid boot.ini
Press any key to restart

Share this on:

More helpful Articles

Download PDFDownload PDF

Tags: , , , , ,

Leave a Reply

CommentLuv badge