Home | My Computer | What's Inside | Operating Systems | Tips&Tricks | NewsLetter
Care&Maintenance | Miscellaneous | About PC ComputerNotes | Disclaimer | Contact


NewsLetter

August, 2000

In This Month's Issue:

Backing Up The Registry

What Is The Registry?
So What's The Problem?
If I'm Careful, Do I Need To Worry?
What Do I Need To Know?

Back It Up!
Tips & Tricks.

 


Click to Subscribe!

 

 

 

 

 

What Is The Registry?

The Registry in Win9x contains much of the information needed for the proper setup, configuration, initialization and execution of the hardware and applications installed on your computer. It contains all the user preferences and the plug and play information and resources allocated at startup. It tells the operating system how to access the modem, what background color is being used on the desktop, and where to find all the files required to run an application.

The registry keeps track of all associations. In other words, it knows which program to open when you double-click a document file or a graphic file.

Windows 3x also had a Registry of sorts (reg.dat), but most of the setup info was provided in initialization (.ini) files, including the System.ini and Win.ini. This produced miles of .ini files in the Windows directory, most of which remained, even after an application was removed.

Windows 95 made an attempt to get rid of a good number of these .ini files and consolodate all the information into a single Registry.

During the crossover, there were still lots of .ini files being written to the Windows directory. Of course, the older DOS programs still used the .ini files, and so did some of the newer programs that were supposed to be written specifically for Windows 95.

It takes a while to break old habits. Besides, people don't want to have to replace all their equipment and programs every time they upgrade the operating system, so any new OS is designed to maintain backward compatibility.

The odd initialization file still shows up in the Windows directory, and some applications will put .ini files into the program's directory for easy access to various basic changes that can be made without changing the Registry every time.

Remember, when you install a new program, it can write files to many different folders on the hard drive, and can change the contents of several files that already exist and are required at startup, or used in the execution of other programs. And it will make changes to the Registry.

 

Top of Page

 

 

 

 

So What's The Problem?

One problem is that every application program out there seems to consider itself to be the most important thing on your computer! Some will make changes without any consideration as to the impact these changes will have on the applications already installed.

Other programs might not remove themselves properly, or the user may not remove them properly. Over a period of time, as programs are added and removed from a system, unassociated information and orphaned entries are left in the Registry, bloating the files, slowing down performance, causing erroneous errors and possibly halting the system.

Another problem is buggy programs. When you consider the hundreds of thousands of lines of code that go into today's programs, it's easy to believe that every program you use has bugs in it, some more than others.

Today's large programs are generally written by many different programmers, each working on a different part or section. Let's take a quick look at the process!

Once a programmer completes the code for an individual section, its checked for mistakes or problems, and repairs are made until the code performs properly. This is the debugging process, and is a very large and time- consuming part of the programmer's job.

The programmer also has to create error handlers (more code) for the many possible improper responses or input errors that can occur when thousands of different users interact with the program.

When all the bugs they can find are worked out, the program is compiled into a working application (not necessarily complete) and tested.

You've got to remember however, that these people wrote the program. They know it inside and out. Without conscious effort, they may be working around a problem that isn't recognized.

So, the program is distributed to other associated individuals that use it for a period of time, and identify user difficulties or bugs. Enhancements or fixes are made by the programmers. This may be done several times, and is known as Alpha testing.

Now the application is ready for Beta testing. Beta versions of the program can be downloaded from the Internet by unassociated individuals and installed on their computers for testing.

The idea is to have a wide variety of users try it out over a period of time and report on any problems that they find. This allows the program to be tested alongside a multitude of other applications, on thousands of different computers using many different hardware and software configurations.

Bugs and problems then found by the average user can be identified and addressed by the developers. But you take your chances. They are not necessarily complete programs.

Here's where you find another problem for your Registry! Beta versions have been known to screw up the Registry and corrupt files used by other programs. They really should be installed on computers dedicated to Beta testing. They are not meant to be used on the typical home or business computer that has important data on it. Beta testing is not for everyone.

But, everyone wants the latest version of their favorite program! The popularity of the Internet has made Beta versions available to hundreds of thousands of individuals that don't understand the possible consequences, or what Beta testing is. Kids are amazingly fast at picking up computer skills and learning to understand the Internet and it's possibilities, but most seem to think 'Beta' stands for "This is the new version, you must have it!"

Everyone has seen (and downloaded) Beta versions of Windows, Internet Explorer, Netscape, ICQ and a multitude of others on the Internet. Yes, these are often full working programs, but they're being made available for testing before they are released to the general public as complete programs.

Just so you don't get confused, there are completed versions of these programs available for download also. If they are Beta versions, they will say Beta version.

What about shareware or freeware? There are thousands of excellent programs available on the Internet. I use them all the time. Just be aware that ShareWare may not be complete until you register and pay for it. FreeWare programs may have been written by a single programmer, and might go through shorter periods of Alpha and Beta testing.

Please don't get me wrong, I'm not trying to dissuade anyone from testing Beta programs or using shareware or freeware, I'm only commenting on some of the hundreds of ways that the Registry (or any of your files for that matter) can become corrupted, and the importance of properly backing it up.

Like I said before, even store-bought programs from reputable developers, right out of the box, can cause problems for any number of reasons.

And don't forget viruses. They quite often attack the Registry. If your computer is suffering from unexplainable problems, always do a virus check. Upgrade your virus program every year, and download new virus signatures on a monthly or semi-monthly basis.

Top of Page

 

 

 

 

 

If I'm Careful, Do I Need To Worry?

"I haven't installed any new hardware or software.", "I never use Beta programs, and I don't download anything from the Internet." "How come my computer won't start and it's giving me a registry error?" " How could I possibly have corrupted the Registry?"

Well...

Have you ever had a power surge or a power failure?

Have you ever had a program freeze up on you?

Have you ever shut down your computer without closing out of Windows properly?

What about clicking on a file that you're not familiar with just to see what it does?

Have you ever removed a program from your computer simply by deleting the folder it's in?

Has your computer ever rebooted for no apparent reason?

Did you ever leave your computer on overnight and find it wasn't on in the morning?

Of course, you've never plugged in, or unplugged a peripheral while the machine is on!

And you've never had your computer on during a thunderstorm.

Ever turn off your computer before it's done booting? That's OK isn't it?

Did you ever make any changes to the Registry with the Registry Editor?

Have you ever opened the Registry Editor?

Ever try to change your display's resolution, or the number of colors?

Have you ever clicked on a file and accidentally moved it to another folder?

Have you ever had kids using your computer?

Have you ever used your computer on a weekday, or a weekend?

Have you ever sworn at your computer? They don't like that!

.... I think you get the idea. It's not a matter of if you'll ever have Registry problems. It's a matter of when!

Top of Page

 

 

 

 

 

What Do I Need To Know?

You're going to have to learn a few things if you want to safely and successfully backup and restore your Registry. First off, you need to know that the Registry is made up of two files, SYSTEM.DAT and USER.DAT. These files are normally stored in the C:\WINDOWS directory (you will learn of exceptions to this). You also need to understand the different 'attributes' that need to be changed on these two Registry files so that you can copy, move, rename and manipulate them.

You need to know that there are thousands of lines in your Registry made up of binary and textual entries, and that you should not try to open these two files (system.dat and user.dat) in an ordinary word processor program or text editor.

You need to know what a file's attributes are. You can find a file's attributes by right-clicking on it in Windows 9x, choosing 'properties' and looking at the bottom of the 'general' tab for 'attributes'.

Read-only - means that the file can be read or looked at, but you can't make any changes to it. If you try to make changes, you will get an "Access Denied" warning.

Hidden - means that the file is not viewable. You can't even see it when you look at the contents of a folder. In Windows 9x you can get around this by clicking 'View' on the menu bar and choosing Folder Options. Click on the View Tab at the top and highlight the 'show all files' radio button. Now you can see all files in that folder, even the ones with their hidden attribute set.

System - This attribute distinguishes the file as an operating system file. They usually also have their 'hidden' and 'read-only' attributes set. You may have to remove the system attribute on a file before you can change the others.

Archive - the Archive attribute is used by backup programs to tell if the file has been backed up, or copied.

To view a file's attributes from the DOS prompt, you need to know how to use the ATTRIB command in DOS.

Whoa .... DOS? ...Of course! Tell me, if your Registry is corrupt and you can't start Windows, did you think you were going to go into Windows to fix it? This is a common mistake.

People are told to make an emergency boot disk. Then they figure that when their computer won't start, all they have to do is install the boot disk and turn on their computer.

They're surprised when all they see is a flashing cursor on a black screen instead of their usual graphical desktop with the splashy wallpaper.

You should be familiar with DOS file naming protocols and stick to them when backing up. If you use long filenames or directories for backups, they will be truncated, and may be difficult to work with in DOS. You also want to be familiar with how to start your computer to the DOS prompt using the start-up menu in Windows 95/98.

How to boot to the DOS prompt in Windows 95/98 and DOS file naming protocols can be found at the link below.

Oh yeah, you need to know how to make a boot disk.

And you need to know some basic DOS commands and their usage: DIR, CD, MD, COPY, DEL, REN, (and we already mentioned ATTRIB). If you're not familiar with these commands,
Click here!

Top of Page

 

 

 

 

 

Back It Up!

The Registry is absolutely necessary for your Windows 95/98 computer to start up. It contains all the configuration information required by your system to run properly. A small problem in the Registry can stop your computer cold. A poorly written or corrupted program can mess up your Registry and cause all kinds of problems with your computer. Because its such an integral part of Windows, and because it can tend to be so volatile, its important to know how to back the Registry up reliably. It's also important to test your backups by making sure they can be restored.

The Registry files themselves are made up of two files called SYSTEM.DAT and USER.DAT. These are binary files containing binary and textual entries. They can't be read in a word processor or a simple text editor like '.ini' files can. Windows also turns on their system, hidden, and read-only attributes so that the user can't accidentally replace, change or delete these files.

SYSTEM.DAT contains the information and configuration for your system. The allocation of hardware and software resources. What's installed, what's not, and which drivers are being used by which devices. SYSTEM.DAT can be found in the C:\WINDOWS directory.

USER.DAT stores the different user preferences. Which colors and fonts are being used, passwords, wallpaper, which icons are visible and desktop configuration for the specific user. USER.DAT can also be found in the C:\WINDOWS directory. If the computer is configured to use profiles (different user names and passwords), then a separate USER.DAT is required for each profile and it will be stored in C:\WINDOWS\PROFILES\USERNAME. 'USERNAME' being the user name used in each specific profile. In other words, my specific USER.DAT file would be stored in C:\WINDOWS\PROFILES\CRAIG. There will still be a generic USER.DAT in C:\WINDOWS for users that don't yet have a profile.

Go look at them right now. You may have to change the view in Windows Explorer so that you can see hidden files. Click START/PROGRAMS/WINDOWS EXPLORER. On the menu bar at the top of the window, click 'View' and choose 'Folder Options'. You'll see 3 tabs at the top, choose view. Make sure the radio button that says 'show all files' is selected. Click OK.

In the left hand pane of Windows Explorer, scroll down and highlight the Windows folder. Now in the right pane, scroll all the way down until you find SYSTEM.DAT. You'll notice it's not as clear as the other files. That's because it's hidden attribute is set. Right-click on the file and choose 'Properties'. You'll see the file's attributes near the bottom. You don't have to change them. Now scroll down and find USER.DAT.

So to back up the Registry, we need to back up these files. I'm not going to discuss whether you should be backing up to floppy, zip or tape, this can and should be done when you do your system backups. What we're going to do is back the Registry up to the hard drive. That way, it can be accessed in the event of a Registry failure using your boot disk or the start-up menu.

****************

 

The good news is, Windows 95 performs an automatic backup of the two Registry files every time it starts up successfully. The backup files are named SYSTEM.DA0 and USER.DA0 (that's a zero on the end) and they're stored in the same directory as their counterparts. This way, if SYSTEM.DAT and USER.DAT become corrupted and Windows won't start, you can replace them with SYSTEM.DA0 and USER.DA0 which may resolve the situation.

The bad news is that these files are overwritten each time Windows starts successfully, and Windows' idea of a successful start may be different from yours. Often, these backup files contain copies of corrupted Registry files.

If you're using Windows 95, then look for these files with Windows Explorer in the C:\WINDOWS directory.

*****************

 

Windows 98 also does a backup after a successful start, but Win98 tends to handle the process
a little differently. The program that performs the backup is called Scanreg(SCANREG.EXE inDOS and SCANREGW.EXE when Windows is running). It puts the two files together and stores them in a .CAB file in the C:\WINDOWS\SYSBCKUP directory.

Scanreg keeps several backups allowing you to choose which one you want restored in an emergency. If you wish to perform a manual backup in Windows 98, click START/PROGRAMS/ACCESSORIES/SYSTEM TOOLS/SYSTEM INFORMATION and in the Microsoft System Information program, click on 'Tools' and choose Registry Checker. It will tell you that the Registry has already been backed up today, but will give you the option of performing another backup. Check it out.

******************

 

Well, there's a couple of automatic backups for your Registry. What about other ways?

There is a program that came with Windows 95 called Cfgback. It will allow you to make several backups of your Registry and choose the one you want to restore when you need to. However, this program is unreliable. It can cause more problems than anything else, and I believe even Microsoft suggests you don't use it. So, I mention it here only to warn you.

*****************

 

One way to backup your Registry files is to use the Registry Editor. Be very careful in the Registry Editor. One mistake can cause your computer to become inoperable. That being said, it's really not that bad. Just don't make any changes. If you do, remember the Registry Editor doesn't give you a second chance. There's no Recycle Bin, and no 'undo'. As soon as you click, the change is made and there's no way to change it back(except for your backups).

Click on Start, choose Run, type in 'regedit' and press ENTER. The menu bar at the top will display the choices Registry, Edit, View and Help. Click on Registry. Then click on 'Export Registry File'. Another window will pop up asking you where you want to save the file (choose a folder set aside for this purpose). Next, in the middle of this window is a text box that says 'File Name'. Type in a name for the backup file, such as regbck. The file will be saved with a '.reg' extension.

Notice there is a section called 'Export Range'. This allows you to export the entire Registry (which is what we're doing here), or just a portion or branch of the Registry. That way, if you're just working or changing a single Key, you don't have to export the whole Registry.

Select 'All', and click SAVE. (Remember which folder you saved it in.) If you chose the name regbck, there will now be a backup file of the Registry in that folder called REGBCK.REG. Check it out.

To restore the Registry (or portion of the Registry) from Windows, all you have to do is double click on the .REG file. Pretty neat, huh?

Only problem is, if you have a corrupted Registry you may not get back into windows. Restoring from DOS is another matter. In fact, if you are doing a complete restoration of the entire Registry, and the files are fairly large, restoring from DOS may result in an error. For this reason, I don't use the Registry Editor as my primary backup.

*****************

 

And finally, my all time favorite way to back up the Registry... Copy the files to another folder. Here's how simple it is...

Once again, open the Windows Explorer. In the left hand pane of Windows Explorer, scroll down and highlight the Windows folder. Right-click any of the white space in the right pane and a pop-up menu will appear. Choose 'New', and then 'Folder'. Call the new folder what you like, mine is called 'SAFEREG'(Remember, you want to follow DOS file naming protocols). This is where we're going to save our copies (C:\WINDOWS\SAFEREG).

In the left hand pane of Explorer, click on the '+' sign beside Windows. Scroll down until you can see the folder SAFEREG (don't highlight it, the Windows folder should still be highlighted). In the right pane, scroll down until you find SYSTEM.DAT. Right-click SYSTEM.DAT and drag it over to the SAFEREG folder in the left pane. Let go of the button and choose 'copy' from the menu that pops up. Do the same with USER.DAT.

Just to check, click on the SAFEREG folder and make sure the two files, USER.DAT and SYSTEM.DAT show up in the right pane. Right click each one and choose 'properties'. Remove the checkmarks from the attributes boxes so that the system, hidden and read-only attributes aren't set. You're done your back up.

****************

 

There are also third party programs that are available for backing up and restoring the Registry. I can't really comment on them because I haven't tried any. If you do decide to take this route, make sure you read and understand the manual and the restoration procedure. It's always a good idea to test your backups.

*****************

 

Next month we'll learn how to restore the different backups we've created. If you have the nerve, we'll check them out by destroying the Registry and using the backups to rebuild System.dat and User.dat.

Top of Page

 

 

 

 

 

Tips & Tricks.

With a newsletter on backing up the Registry, one might expect a bunch of little Registry tricks and workarounds. Actually, backing up the Registry is a good start towards working in the Registry Editor.

But that will be another newsletter.

 

**AVOIDING HARDWARE CONFLICTS**
If a hardware device does not work on a computer using Windows 95 or 98, it could be conflicting with another device that's trying to use the same resources. There are three values that these devices may need, I/O addresses, IRQs, and DMA channels.

To find out which devices are using which of these resources, right-click on the 'My Computer' icon, click on 'Properties', choose the Device Manager tab and right-click the computer icon at the top of the list. Choose 'Properties' and make sure the 'View Resources' tab is highlighted. You can now choose which resource you want to inspect by clicking the radio buttons. Using the scroll bar on the side will reveal which devices are associated with each resource.

In Windows98, another way to view this information is to click: Start/Programs/Accessories/System Tools/System Information. When the Microsoft System Information window appears, click the '+' sign beside 'Hardware Resources'. Now, just choose the resource you want to check out, DMA, I/O or IRQ.

 

**REMOVE A DEVICE BEFORE REINSTALLING**
If a device is not working, sometimes you can fix the problem by re-installing or upgrading the drivers. When doing this, it's a good idea to remove the device from the Device Manager first.

Right-click 'My Computer' and choose 'Properties'. Click the Device Manager tab and then click the '+' sign beside the device that isn't working. Highlight the device and click the 'Remove' button.

Now you can re-install the device by re-starting Windows and allowing it to find the device and lead you through the installation process. If it doesn't find it, then use the 'Add New Hardware' icon in the Control Panel.

I've seen computers that have 5 or 6 modems or printers loaded because the user just kept re-installing when the device wouldn't work. This will tend to confuse your computer. All copies of a device should be removed before re-installation.

 

**TROUBLE PRINTING LONG DOCUMENTS?**
Do you find sometimes that your printer just gives up when you're trying to print long documents. It may just quit without an error message, or it may give you an error such as "Lost communication with LPT1" or "No response from Printer". There are a few things you can try.

Click on Start/Settings/Printers and then right-click the printer you're trying to use. Choose 'Properties' and then the 'Details' tab. Near the bottom you'll see the Timeout Settings. Increase the value in the Transmission Retry box to allow a longer wait for transmission.

You'll also see a couple of buttons near the bottom. Click the 'Spool Settings' button. Click the radio button that says "Start printing after last page is spooled".

As a quick workaround, you might try printing in stages. Print pages 1 to 8, then 9 to 16, then 17 to 24.

 

**REGCLEAN.EXE - CLEANING UP YOUR REGISTRY**
Every time you install or uninstall a program in Windows 95/98, entries in your Registry are created or modified. You may experience minor Registry errors, system slowdowns and computer problems over a period of time, as unused or dissociated Registry key entries develop. RegClean will not fix a corrupted Registry, but it may make it a little more expeditious, and help improve performance by keeping it free of the garbage and gibberish that can be left behind by software that doesn't remove itself properly.

According to Microsoft, "RegClean analyzes Windows Registry keys that are stored in a common location in the Windows Registry. It finds keys that contain erroneous values, and after recording those entries in an UNDO.REG file, it removes them from the Windows Registry." For more information, and to download REGCLEAN.EXE, Click here!

******************

That's it for this month. If you have any questions, comments, ideas or suggestions for the NewsLetter, or our WebSite, please email me at: suggestions@pccomputernotes.com

Home | My Computer | What's Inside | Operating Systems
Tips&Tricks | NewsLetter | Care&Maintenance | Miscellaneous
About PC ComputerNotes
| Disclaimer | Contact

 

 

 

PC ComputerNotes
and Online Tutorials