« Disaster Recovery Plans | Password Security & Managers » |
Sooner or later almost all computers will freeze or crash. If it freezes you may have to induce a crash by holding in the on/off button for at least 4 seconds. But when it crashes Windows files that are in volatile memory (RAM) will not get flushed out to disk and so will then become corrupted so you may be inadvertently exacerbating the problem by inducing a crash. Sometimes the corruption is fatal, sometimes it does not bite you until a few weeks later, other times it will not affect you at all.
To resolve many potential corruptions there are two things you may like to do. First check and repair the disk drive. The following command will ensure the integrity of files, their indices, attributes and security descriptors as well as checking and if necessary repairing some disk control structures and identifying bad sectors.
To do this you need to get to the Windows command prompt by entering CMD
into the search box that appears when you click the orb at the bottom left of the task bar. Now right click CMD.EXE and Run as administrator. In the black window that appears type CHKDSK /R
and press [enter]. You will be warned that the operation cannot start as the volume is in use by another process (Windows) and given the opportunity to schedule it next time the system restarts. Accept this an then be prepared for the computer to take 30 - 60 minutes to go through all 5 phases of the operation next time you start it. Repairs, if necessary, are automatic and there is no message indicating completion displayed on the screen when it eventually starts. If you are interested in the results you can interrogate the Event Viewer later.
Once the underlying structure of the disk is known to be good you can check the validity of Windows' own files. The following command will confirm that the important files' signatures are valid. If they are not you will be invited to insert your Windows DVD to facilitate the copying of the original file (this may be taken from an on-disk repository in later systems). To do this you need to get to the Windows command prompt by entering CMD
into the search box that appears when you click the orb at the bottom left of the task bar. Now right click CMD.EXE and Run as administrator. In the black window that appears type SFC /SCANNOW
and press [enter]. At the end of the operation (which will take about 10 minutes) you can type EXIT
to close the window.
Should the SFC command find corruptions that could not be repaired then the command dism /online /cleanup-image /restorehealth
Can be issued before issuing another SFC command if on Windows 8 or later.
If uncorrectable faults are found you will be directed to an almost unintelligable log file. To sift the wheat from the chaff get to the CMD mode as before and enter
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
Now you will have a file on your desktop named sfcdetails.txt which can be read to identify the miscreant files. For each one you need to get an unadulterated copy from the Windows installation DVD. This is done by running your favourite ZIP extraction file in compatability mode as administrator. On the Windows DVD navigate to the Sources folder and within that expand install.wim within that there will be a numbered folder relevent to your edition of Windows - see the 1.XML file for decryption. Look for the <IMAGE INDEX="#"> entry and the <NAME>edition</NAME>.
Now you can navigate to the appropriate Windows\System32 folder and extract the required file. Do this for every corrupt file.
Trackback URL (right click and copy shortcut/link location)