Many people buy problem-fixing toolkit software packages such as Symantec’s Norton Utilities or SystemWorks and similar from other makers. However, it is a common experience to find that these tools can create more problems than they fix. In particular, their Registry clean-up tools frequently cause problems, and all the so-called crash-avoidance programs are notorious for causing crashes rather than circumventing them.
The tools described here can fix many problems, but if the system has become very messed-up, the only sure way is to reformat the disk and re-install Windows and everything else. Because of the way the Registry works – the fact that it (foolishly) serves both the system and applications – you have to re-install all application software if you re-install Windows. Theoretically, if you re-install Windows without wiping the disk clean first, it will re-use the previous settings for applications. But in practice, that quite often reactivates the previous problems.
It comes as a surprise to many people to learn that Microsoft do supply some fix-up tools as standard with Windows, and that those tools do a very good job. However, Microsoft hide them quite thoroughly! They are not actually much more difficult to use than those in the slick add-on products, and are certainly less prone to malfunction.
The main tools that Microsoft provide are ‘System File Checker’ (SFC), ‘ScanReg’, ‘Scandisk’, ‘System Configuration Utility’ (SCU), ‘Defrag’ and ‘Disk Clean-up’.
The first two, SFC and Scanreg, are the ones most commonly needed to fix problems. These notes were written for Windows 98se, but the tools have been essentially the same for some time, although you must use the ones provided with the particular system. I am indebted to my friend Rex Ramsey for help with putting together this information.
System File Checker (SFC)
System File Checker runs within Windows, but has to be started by typing its filename as it is not placed on the Start menu. (You could put it there of course.) Pick the Start menu, and ‘Run’. In the Run window, type in SFC and click OK. (upper case doesn’t matter) The SFC window will pop up and has two main options, which are reasonably self-explanatory. Usually ‘Scan for altered files’ is what is needed.
System File Checker is particularly useful for fixing problems resulting from important Windows System files being altered or deleted. Regrettably, this too often happens when badly written application programs replace them with their own versions – a practice that the Windows system ought to absolutely block (as Linux does) but unfortunately does not. The most common problem is shared system files such as DLL files.
Sometimes a program installation will replace a DLL that Windows installed with one that was intended for an earlier version of Windows. SFC can find and replace these. Having fixed that, it may be found that the program that caused the upset will then refuse to work with the restored DLL. In that case, complain to the maker of that program or ditch it as bad and unusable.
ScanReg scans the System Registry for erroneous entries, and provides various options to control its actions and how it fixes any problems it may find. Because the Registry is so deeply involved in Windows operation, ScanReg has to be run from a non-graphic (DOS) environment so that it can alter Registry data without upsetting the running Windows. That means you need to reboot to DOS mode before running Scanreg to fix or replace the Registry. Running it in a DOS pop-up window from the Start menu is not sufficient, because the whole Windows graphical environment needs to be closed down. Pick Start, Shutdown and select ‘Reboot to DOS’. This presents a problem for users of Windows ME and 2000, which don’t have a DOS restart-mode. It is possible however to create a reboot floppy disk that will start up those systems without the graphic environment.
When using DOS, if a file-path in a command involves long file-names, enclose the whole path, including the drive letter, in quotes, eg: “C:Program FilesThingumyRead this first.txt”. Otherwise, you have to use the 8-character truncated names ending with ~ and a number, and it is hard to know exactly what they are.
To run ScanReg with all its capabilities, you must shut down and reboot the computer into DOS mode, and then type SCANREG as a DOS command, followed on the same line with the correct command codes for the particular operational options you want, as per normal DOS procedure. The case of the typed commands does not matter. To find out what command option codes there are, type SCANREG /? Which will display the following information:
The most common usage is SCANREG /FIX. This takes some time to run, and then reports what it did. This will fix most Registry problems quite satisfactorily. It does not remove Registry entries that may be ‘orphans’; that is, those relating to programs that are no longer on the system.
SCANREG /BACKUP allows you to save a copy (as a ‘CAB’ file) of the Registry of your current system so that you could later get it back using SCANREG /RESTORE. This is useful if you install and later un-install a program that made the system erratic. It automatically names the files with names like ‘rb003.CAB’. You can supply your own name instead by adding the comment option, thus:
Scanreg /backup /comment=”Before installing XYZ”
That comment will be used instead of the automatic name, and will be shown when SCANREG /RESTORE lists available copies to choose from. Its menu of saved copies has the most recent at the top, and labels them ‘not started’ if they have never been restored, or ‘started’, if they have. It also shows the date they were saved, and a scrollbar, similar to this:
The system normally limits the number of saved Registries to five, but you can increase that by changing the ‘MaxBackupCopies’ in the ‘scanreg.ini’ file in C:Windows.
You can run Scanreg from Windows for certain functions. In this mode, it cannot do anything that alters Registry data. That is, the /?, the /backup and the /comment options can be used but not /fix or /restore. If you just type ‘scanreg’ with no options in the Run box, it will check the Registry for errors and give a report (See FIG-4), and then offers to save a copy of the current Registry, which it auto-names. Running Scanreg this way, within Windows, is a quick and easy way of saving the current registry just before installing a new program. If it finds any errors, you have to reboot to DOS mode and run Scanreg in its full form to fix the errors.
There is also a tool supplied with Windows called REGEDIT, which runs within Windows, but that is less easy and much less safe to use unless you have a good knowledge of the peculiar structure and workings of the Registry. It is best avoided otherwise, as it can so easily create havoc. General Advice
Many of the problems Windows is prone to result from installing and uninstalling applications. When run with a constant set of programs it is much less prone to malfunction. The best procedure to minimise such problems when it is necessary to install programs and later uninstall them, is to always restart the computer after each install or uninstall even if it doesn’t say you must. In this way, the registry is given the best chance to retain its integrity.
A surer way is to restore the Registry as it was before you installed that program, assuming that you had previously saved it using Scanreg /Backup. This is especially good for those occasions when a program (usually a very old one) comes with no un-install facility, or its un-install system fails to work. If you had saved the previous registry, you could restore it, and then just delete all the folders containing that program. It is asking for trouble to delete a program’s files normally (without restoring a previous Registry) because the Registry will still be referencing them.
Since it is quite quick and easy to save the current Registry without rebooting, it is a good idea to do so before every new program installation. If there are already 5 copies, the system will automatically discard the oldest, so you don’t need to worry about accumulating too many copies.
If you really are intent on removing particular Registry entries, you can do so with REGEDIT, but then the responsibility for any resulting malfunctions, lock-ups or disasters is clearly yours. Because I review programs, I install and un-install programs exceptionally frequently, and that is a recipe for trouble with the Windows system. I have found (by inspection using REGEDIT) that the un-install facilities for many programs fail to remove their Registry entries even though I immediately reboot after using each one. Rather than try to clean up the Registry manually with Regedit however, I prefer to restore a copy saved just before the installation. That is far easier and safer.
The use of Scanreg /Fix does not give a ‘spring-cleaned’ registry. That is, it fixes entries that have actual errors but doesn’t clean out inactive entries. The commercial system tools provide nice interactive tools for pruning no longer relevant material out of the registry. However, they very often create more problems than they fix through removing entries that they say are orphans but are in fact still referenced by something. This may be due to inadequacies in the way Windows keeps track of registry references, more than faults in those toolkit applications, but the fact remains that they cannot be trusted, as many people, myself included, have learned from bad experience.
There is an application program available for free download from Microsoft, called REGCLEAN, (version 4.1a at present I think) for cleaning out redundant entries, but the standard Windows system tools mentioned above will usually very adequately fix actual problems. Having redundant data in the Registry is not a major issue. There are several shareware registry-cleaning tools for download from the Internet, but I have found all of those that I have tried, without exception, to be chronically unsafe.
System Configuration Utility (SCU)
This utility allows you to control how the system starts up so that you can watch the progress through all the steps that normally happen behind the Windows sign-on screen or the opening DOS display. By that means you can find out where in the startup sequence a failure to start up is actually failing, and so perhaps figure out what bit of driver software needs to be replaced. In the ‘Diagnostic’ mode loading stops at each step until you hit a key to proceed. You can also use SCU to do a normal continuous startup but deselect certain elements, as seen in FIG 5. Scandisk, Defragment and DiskCleanup
Other useful tools provided with Windows are Scandisk, Defragment and DiskCleanup. The easiest way to get to these is by right-clicking on a drive letter in Explorer or MyComputer and picking ‘Properties’. There is a Tools tab, which has Scandisk, Backup and Defragment on it.
Scandisk is the utility that runs in DOS mode whenever you reboot the computer after Windows has terminated abnormally. It checks the disks for errors in file indexing and space allocation, and can also check the disk surface material for any defects that may have developed. In that mode it takes a long time, and if errors are found it can lock those parts out. If surface errors do develop, it is a sure sign that the disk will need replacing soon, so be sure to keep backups current and make plans to replace the drive.
When Scandisk finds indexing errors it can often rescue the data, but not always. The chances are better if it is run directly after some upset has occurred. The most common problem is caused by a power failure or a system lock-up interrupting a file writing operation before the index was rewritten to match. That’s why Scandisk runs automatically after an abnormal shut-down. Cross-linked files occur when the same chunk of disk data is listed as part of more than one file in the disk’s index system. This can also result from an abnormal stoppage. Scandisk can deal with these errors by deleting the invalidly-indexed data (freeing the disk space) or by saving those chunks of data as arbitrarily named files in C:. The latter is the default action, but is in fact almost always completely useless. It is better to select the other option or to delete the resulting files. Scandisk can be run from Windows via the disk Properties display, or by typing SCANDISK C: (or D: etc) at a DOS prompt.
Defragment should be run every month or two. It rearranges the chunks of data on the disk so that files are stored as continuous blocks of data instead of several bits scattered around the disk. That happens as files are altered, deleted and created. Having files contiguous, especially program files, makes things run faster.
Disk Cleanup is a button on the Properties display. It can also be run by typing CLEANMGR.EXE into the dialog from the Start->Run menu. This tool seeks files that may not be needed for system operation and offers to delete them. Caution is needed in interpreting the display and allowing deletion. Read the information. If in any doubt, leave it in place. I have found this utility’s recommendations are not all that reliable.