../Basics/Editing the registryHome
Editing the registry
Lots of tutorials around, but we'll get one here too, kind of required when we tell you to change things there all the time - a bit more targeted towards tweakin' the interface maybe...
The registry is supposed to be the central place for all system settings, for hardware, operating system and software. It's intended to replace DOS configuration files (autoexec.bat, config.sys, msdos.sys,..), Win 3.xx settings (win.ini, system.ini,..) and the .inf section. While those are still around in 9x (backwards compatability), NT/2k/XP depend on it almost solely. It's the best, and also most dangerous place to change the behaviour of your operating system...
The major resource for advanced information on the registry, loads of old and new tweaks, plus a very active forum, is the Registry guide. Be sure to download their helpfile!
Tools for editing the registry come with Windows itself. Main thing here is "regedit.exe", found in your windows/winnt folder - create a shortcut in your quicklaunch bar, applauncher or whatever. It displays the folder structure of the registry and lets you easily add, edit and delete keys and values. One drawback, it doesn't ask for confirmation; it's very easy to corrupt the registry, so try to only perform tested tweakin'... Windows 2000 has, besides regedit, also regedt32.exe (see below).

When it comes to the startup process, an even easier/safer tool, that comes with Windows 98 and above, is "msconfig.exe", found in the same folder. Furthermore, you should realize that most common edits are better done at the appropiate control panel item, display properties tab etc - just use regedit for options Windows doesn't allow you by default. This is in particular the case in Windows 2000, where there's lots more options available at the control panel and other dialog boxes.

Then, there's lots of not native tools available to help you edit the registry. We won't recommend using those. Regedit is an easy enough tool in itself, no need to put another risk factor next to it. Still, we'll mention two little add-ons.

RegEdit in Me/2k has this feature of opening at the last key that was edited/viewed. If you want something similar for 9x, or the feature extended, there's RegEditX (free, all versions). This utility simply adds a combo box underneath the toolbar, where examined/edited keys will be placed, to get to them fast afterwards. Another cool feature is you can paste any key, copied from a readme, manual or something, into it (hit enter) to easily navigate to it.
Ok, this is really worthwile: "RegShot is a small registry compare utility that allows you to quickly take a snapshot of your registry and then compare it with a second one - done after doing system changes or installing a new software product. The changes report can be produced in text or HTML format and contains a list of all modifications that have taken place between snapshot1 and snapshot2. In addition, you can also specify folders (with subfolders) to be scanned for changes as well." - You need this one.
WAssociate we found an usuful to to work with file-associations, as it shows both keys for a filetype that are present in HKEY_CLASSES_ROOT, presents options for context menu, associations, icon and more. You got to know what you're doing though, it's not a beinners choice.

Widespread across the net is Regclean (free, Win 9x/NT), by Microsoft. This utility will clean obsolete regkeys, left there by bad designed software, but only in Hkey_classes_root (file associations etc). Also, be sure to get version 4.1a - previous versions contained some serious bugs. Note: MS stopped providing this utility - link point to WinGuides download page, hoping they'll keep it updated :).
The content of the registry is placed, physically, in a couple of files. You've got at least "system.dat" and "user.dat", when running 9x. These are placed in your windows directory; when running multiple profiles the user.dat part has more versions, found in the underlying profiles folder. When having used the policy editor there may also be a "Policy.pol", overriding statements in the other two.

Within Windows 95 you can manually backup those files. The system makes one backup too. When you find yourself locked out of the system, you can try these lines in DOS:
attrib -h -r -s system.dat
attrib -h -r -s system.da0
copy system.da0 system.dat
attrib -h -r -s user.dat
attrib -h -r -s user.da0
copy user.da0 user.dat
Note that's a zero in da0, not an O. Press Enter after each line. Major drawback here, the backup is created everytime a - seemingly - succesful startup is performed. If you succeed in getting into some crippled configuration, the backup is corrupted too...

Windows 98 has the "registry checker" (C:\Windows\ScanregW.exe and C:\Windows\Command\Scanreg.exe for DOS). This utility scans the registry at every bootup, can fix minor problems, and creates a backup (system.dat, user.dat, win.ini and system.ini) at the first succesful boot every day (default is 5 backups that stay saved). These are placed at \windows\sysbckup into seperate .cab files (rb000.cab etc). Running scanregw.exe will let you make a fresh backup. Running "scanreg /restore" at a DOS prompt will let you choose a backup in this directory (only).

Within Win 2k there's some more files, found in the winnt\system32\config folder, mostly. There are files for each hive key (differing from 9x) and .log files for each one too. More specific:
HKEY_LOCAL_MACHINE\SECURITY - Security and Security.log
HKEY_LOCAL_MACHINE\SOFTWARE - Software and Software.log
HKEY_LOCAL_MACHINE\SYSTEM - System and System.log
HKEY_CURRENT_CONFIG - System and System.log
HKEY_CURRENT_USER - Ntuser.dat and Ntuser.dat.log
HKEY_USERS\.DEFAULT - Default and Default.log
User specific files, again, can be found at different locations, depending if you did an upgrade or not (just search for Ntuser.dat and Ntuser.dat.log). The system backup utility will backup most important keys, but not the entire registry. Servicepack 1 is said to fix that.
The registry editor shows you six hive keys, but only two are saved to disk (Hkey_local_machine - system.dat, and Hkey_users - user.dat); the others are really subkeys of those two, or dynamically created (Hkey_dyn_data):

This key is, in fact, a mirror of HKEY_LOCAL_MACHINE\Software\Classes and contains OLE, shortcut and file association information. You can customize filetype icons and commands, including rightclick options here.
Mirrors the branch of HKEY_USERS loaded for the current user/profile. It contains all settings for the current user, most of the way Windows appears to you is stored here. For appearance tweaking, we'll mention the subkeys "AppEvents" (sounds), "Control Panel" (subkeys like Colors and Desktop are places where many undocumented tweaks are applied) and "Software" (settings for all software, including the OS itself).
Contains all configuration data for this specific computer, regardless as to who is logged in. The "Software" subkey has most settings you might wanna tweak, again...
Holds all user specific settings for all users. If there's only one user, there's mainly the ".default" key, mirrored at HKEY_CURRENT_USER. For simplicity, ignore this hive key if not needed, and use HKCU.
This key is a copy of HKEY_LOCAL_MACHINE\Config\000x, the x representing the hardware profile loaded, probably 0001 if you ain't got multiple configurations. Subkeys specify screen settings ("display"), plug and play BIOS ("enum") and available printers ("system").
Only for 9x, not present in 2k (though it may show). This one's dynamically created and stored in your RAM, so Windows has quick access and information can be changed frequently. For example it stores PnP information and computer performance; the subkey "Config Manager contains all hardware information problem codes, with their status. Not really a place for tweaking.
Basically there three types of values being found in a 9x registry (2k has some more, check below). Just a matter of different ways to store information:
REG_SZ - String value: information contained in a text string.
REG_DWORD - Dword value: information contained in a 8-digit hexadecimal number.
REG_BINARY - Binary value: information contained in a hexadecimal number of variable length.
Nothing much to say about them. Rightclicking the right pane in regedit will let you create them; just follow instructions carefully when you've found a tweak.
Regedit allows you to export and import registry keys/values. Just select a key in the left pane, choose "registry" in the toolbar, and "export". Put in a proper name and you'll have a .reg file anybody can import into their own registry (by doubleclicking it). You can use it to save your own modifications too. Here's an example I got from my machine:

The first line is needed to define it to be a .reg file indeed, then there's the line defining the actual key. If the key's not there, it will be created by importing the file. You can also see the syntax needed to import specific values. A string value needs to be in double quotes. When you're entering a path, it generally better to use double slashes, though regedit doesn't export a key that way. So, it should be "D:\\Desktop\\Start.bmp". Dword and binary values require no quotes, but dword: and hex: added before the content of the value.
An undocumented feature of .reg files is, you can also use them to delete keys and/or values. Like to delete this one (don't), just add a minus sign before the key:

To delete a value, put the minus sign just after the "=", like:

Customization as described on these pages (as opposed to overclocking etc) will mostly be done in HKCR and the software branches of HKLM and HKCU - \Software\Microsoft\Windows\CurrentVersion\... The key HKEY_CURRENT_USER\Control Panel\Desktop holds a lot of values related to the look of the desktop. Most of them can be handled within Windows itself, but not all, check here. When it comes to icon settings, go here.
As said, Win 2k provides two tools for editing the registry, regedit.exe and regedt32.exe. Regedit.exe is just the 9x editor, provided for search capabilities and being easier to use. For that, you might stick with in in 2k (I did). But there's some stuff to consider.
The registry in NT versions works with a couple more value types. Besides string, dword and binary values there are also:
These don't get recognized by regedit.exe, it may even display them as binary. If you edit them they'll get saved as string values - this may render your system seriously broken! So, if you stick with regedit, make sure you're not just fooling around, verify a tweak's source, is it reliable (?) and foremost, in the tweak's description, is it made perfectly clear that a string/dword/binary value is to be made/altered. If not, open regedt32.exe.

xhtml 1.1