# Windows Registry Hacks/Printable version

The current, editable version of this book is available in Wikibooks, the open-content textbooks collection, at
https://en.wikibooks.org/wiki/Windows_Registry_Hacks

# Visual enhancement tweaks

This section deals with registry hacks which enhance the experience of using Windows.

## Custom encrypted and compressed folder color

Description: Windows displays encrypted and compressed folders in green and blue color respectively.
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer :
| Setting | Value | Type |
| Compressed folders | AltColor | REG_BINARY |
| Encrypted folders | AltEncryptionColor | REG_BINARY |
The format for colors is
| Key | HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer |
| Value Name | REG_BINARY |
| Data Type | AltEncryptionColor |
| Data | 0xFF 0x00 0x00 0x00 |

## Custom hot tracking color

Description: If single click navigation is enabled then on hovering folders, they are shown in a blue color by default. Format for colors is
| Key | HKCU\Control Panel\Colors |
| Value Name | HotTrackingColor |
| Data Type | REG_SZ |
| Data | 128 128 0 |

## Smooth scrolling

Description: Smooth scrolling changes the way windows scrolling works.Turning it ON may consume resources.
| Key | HKCU\Control Panel\Desktop |
| Value Name | SmoothScroll |
| Data Type | REG_DWORD |
| Data | 0 OR 1 |

## Reorganizing control panel

Description: The default category view in Windows Xp categorizes certain control panel icons in one category. This categorization can be controlled by adding a REG_DWORD value to the required category ID.
| Key | HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Extended Properties\ {305CA226-D286-468e-B848-2B2E8E697B74} 2 |
| Value Name | %SystemRoot%\system32\timedate.cpl |
| Data Type | REG_DWORD |
| Data | 0x00000001 |
| 0x00000000 | Other options (any tool which doesn't provide category is placed here) |
| 0x00000001 | Appearance and Themes |
| 0x00000002 | Printers and Other Hardware |
| 0x00000003 | Network and Internet Connections |
| 0x00000004 | Sounds, Speech, and Audio Devices |
| 0x00000005 | Performance and Maintenance |
| 0x00000006 | Date, Time, Language, and Regional Options |
| 0x00000007 | Accessibility Options |
| 0xFFFFFFFF | No category. Such tools are started directly e.g. Add/Remove programs |

# Other miscellaneous tweaks
## Adding Resize option to images

This hack will allow any JPG file to be resized from the context-menu. First: get ImageMagick toolkit for windows from This site and install it. Next: create a cmd file (a batch file for windows NT,XP, Vista) with the following contents:
Let's say we name this file C:\Program Files\ImageMagick-6.3.7-Q16\convert1024.cmd Now we have the command at hand to resize an arbitrary image to max dimensions of 1024x1024, keeping the aspect ratio intact. Here's how we add this command to the context menu:
* Open any folder (e.g. My Documents)
* Go to Tools | Folder Options...
* On the opened dialog, go to the File Types tabsheet
* Select in the "registered file types" the file type you want to add the resize option for. E.g. choose JPG for the most commonly used file format.
* Click the 'Advanced' button.
* In the dialog that just opened, click the 'New...' button
* In 'Action' fill in the description of the resize action. E.g. enter 'Re&size to 1024x1024 max'
* Click the browse button, and navigate to the cmd file we created in the beginning. Select it, and Click OK to confirm it all.
* Close the File Types dialog, and presto: you now have a resize command at the ready.

# Internet software tweaks
## Multiple instances of Yahoo! messenger

Description: The default behavior of Yahoo! messenger is such that only one instance can run at one time. But sometimes logging in from multiple IDs maybe required.
| Key | HKCU\Software\yahoo\pager\test |
| Value Name | REG_DWORD |
| Data Type | Plural |
| Data | 2 |

# Internet Explorer

This chapter deals with tweaks related to visual enhancement, performance and miscellaneous factors related to Internet Explorer

## Custom Information pages

There are 10 information pages in total which include "navigation failure", "web page unavailable", "about:tabs" etc. The pages along with their default paths are:
| Value | Default Data ( in IE 6) | Default Data ( in IE 7) |
| blank | res://mshtml.dll/blank.htm | res://mshtml.dll/blank.htm |
| NavigationFailure | res://shdoclc.dll/navcancl.htm | res://ieframe.dll/navcancl.htm |
| DesktopItemNavigationFailure | res://shdoclc.dll/navcancl.htm | res://ieframe.dll/navcancl.htm |
| NavigationCanceled | res://shdoclc.dll/navcancl.htm | res://ieframe.dll/navcancl.htm |
| OfflineInformation | res://shdoclc.dll/offcancl.htm | res://ieframe.dll/offcancl.htm |
| PostNotCached | res://mshtml.dll/repost.htm | res://ieframe.dll/repost.htm |
| NoAdd-ons | value not available | res://ieframe.dll/noaddon.htm |
| NoAdd-onsInfo | value not available | res://ieframe.dll/noaddoninfo.htm |
| SecurityRisk | value not available | res://ieframe.dll/securityatrisk.htm |
| Tabs | value not available | res://ieframe.dll/tabswelcome.htm |
Note: "res://" in above paths stands for "resource".
The Key and data type are:
| Key | HKLM\Software\Microsoft\Internet Explorer\AboutURLs |
| Value Name | NavigationFailure |
| Data Type | REG_SZ |
| Data | path to custom html page |
TIP: * In case of a browser hijack, the values will be changed to reflect a particular URL. Putting back the default values can help in counter measures.
* All the default pages can bee seen by copy-pasting the path to Run dialog box (e.g. pasting "res://shdoclc.dll/offcancl.htm" in Run dialog box will open up the "web page unavailable offline" page.
* Or they can be seen by typing in the Run Dialog box OR IE address bar the following:
** about:<value>
*** replacing <value> with one of the values from table above as below
** about:OfflineInformation
** about:Tabs

## Background bitmap for explorer toolbars

Description: Internet explorer can be customized to use a bitmap image as a background for toolbars.
Note: Only images with bmp as extension will work.
| Key | HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar |
| Value Name | BackBitmapShell < This is the name of your new "String Value" |
| Data Type | String Value (Right click on right-hand pane and select "New > String Value") |
| Data | Enter the direct path to your bitmap image (e.g. C:\WINDOWS\Resources\"New Folder Name") |

## Custom loading icon and animation

Description: Internet Explorer uses static and dynamic icons which can be seen at top-right. 4 Values are needed for customization which are:
| Value | Description |
| BigBitmap | A 38x38 pixel bitmap image which is in use when no data transfer takes place. |
| SmallBitmap | A 22x22 pixel bitmap which is in use when no data transfer takes place. |
| BrandBitmap | A 38x38 pixel GIF image which is in use when data transfer takes place. |
| SmBrandBitmap | A 22x22 pixel GIF image which is in use when data transfer takes place. |
| Key | HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar |
| Value Name | BigBitmap |
| Data Type | REG_SZ |
| Data | path to 38x38 bitmap image |

## Custom title bar text

Description: The title-bar in Internet Explorer can be customized to show personalized text.
| Key | HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main |
| Value Name | Window Title |
| Data Type | REG_SZ |
| Data | Wikibooks |

## Change hyperlink colors

Description: Hyperlink and visited hyperlink colors are shown in blue (0,0,255) and purple (128,0,128) respectively. Changing the hover text color requires the setting to be enabled first. It can be done by using the following registry:
| Key | HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Settings |
| Value Name | Use Anchor Hover Color |
| Data Type | REG_SZ |
| Data | Yes |
The format for colors is
| Key | HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Settings |
| Value Name | Anchor Color |
| Data Type | REG_SZ |
| Data | 0,255,0 |
| Key | HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Settings |
| Value Name | Anchor Color Visited |
| Data Type | REG_SZ |
| Data | 255,0,0 |
| Key | HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Settings |
| Value Name | Anchor Color Hover |
| Data Type | REG_SZ |
| Data | 0,0,255 |

# Hardware Tweaks
## Fixing error messages
### CD-ROM Drive Related Issues

There is a bug in Microsoft Windows XP and Microsoft Windows Vista, that causes the operating system to ignore the presence of installed devices and drivers, following a reboot of the system. An error message occurs as follows following reboot:
Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)
When this error occurs, the CD-ROM drives do not show as available, so it will not be possible to use the drives, even though the CD-ROM drives may have been operating normally during the previous session.

### Uninstalling the device does not fix this error

Uninstalling the drive using the device manager and rebooting the computer does not resolve this error.

## Affected Systems

Microsoft Windows XP Microsoft Windows Vista

## Resolution

In order to resolve this issue, it is necessary to edit the CD-ROM drive class registrykey, using the registryeditor, as follows:
Remove any of the following registry entries against the CD-ROM drive class registrykey:
It is now necessary to reboot the computer in order for the CD-ROM drives to be made visible.

# HKEY CLASSES ROOT

The *Microsoft Windows Registry* is divided into sets and subsets. The HKEY_CLASSES_ROOT set contains the following subset entries:
* The file extension subset types:
* The class identifiers
* The typelib entries
* Package and vendor specific entries
* Compatibility entries
* Installer entries
* Virtual store entries

# HKEY LOCAL MACHINE
## Autologon

In the case of a Windows family with one (admin) user and no password, his desktop may open automatically after the boot: that's the autologin system.
To set it on the other configurations (eg: Windows professional), just execute a .reg file with the following keys:
Beware: the password will become readable (in Regedit) by anyone who touches the machine.

## Changing program installation directories

With Cygwin you can list the registry entries concerning installation directories with one of these commands:
    regtool list -v /HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Microsoft/Windows/CurrentVersion | grep Program
or
    regtool list -v /HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion | grep Program
The output should be something like:

## Changing the user home directory

The registry key that has to be changed is
    HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion\ProfileList\ProfilesDirectory
The default value is %SystemDrive%\Users and can be changed to a specific path (without %SystemDrive%), like for instance U:\usr\unix\cygwin\home.
To move the remaining content of C:\users you have to open "Start -> Control Panel -> Folder Options" and select the "Show Hidden files, folders, and drives" option in the "View" tab. This will make a "default" subdirectory visible in the C:\users directory. Now most of the content of C:\users can be copied to the new destination (but not all the files of the active user).
For the "default" and "public" subdirectories the following keys need to be set to point to the new location:
    HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion\ProfileList\Default
    HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion\ProfileList\Public
On Windows 7 (and probably other versions) the procedure does only affect accounts created after changing the ProfilesDirectory setting. For all other accounts the location of the Desktop, Documents and other standardized directories have to be changed manually, which is, of course, also possible without changing the registry. These locations are: Contacts, Desktop, Documents, Downloads, Favorites, Links, Music, Pictures, Saved Games, Searches, Videos and Virtual Machines.
For accounts created earlier one should also use %windir%\system32\compmgmt.msc (Computer Management) to change the location of the home folder local path under the "Profile" tab. This will, however, not automatically change the location of Desktop, Documents and other standardized directories.

# HKEY USERS

HKEY USERS/Default/Control panel/Desktop/ select wallpaper and in path enter your own wall paper path

# Alphanumerical List of Microsoft Windows Registry Class Identifiers

The *Microsoft Windows Registry* contains a set of Globally Unique Identifier keys.
The following Globally Unique Identifier keys are used as Class Identifiers within the Microsoft Windows registry, and are stored as a subclass of the HKEY_CLASSES_ROOT\CLSID registry subset entry:

# Alphanumerical List of Microsoft Windows Registry Type Library Entries

The *Microsoft Windows Registry* contains a set of Globally Unique Identifier keys that are used as type library entries within the Microsoft Windows registry. These entries are stored in a subclass of the HKEY_CLASSES_ROOT\Typelib registry subset:

# Alphanumerical List of Microsoft Windows Registry Installer Component Entries

The *Microsoft Windows Registry* contains a set of Globally Unique Identifier keys that are used as installr component entries within the Microsoft Windows registry. These entries are stored in a subclass of the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Installer\Userdata\5-1-5-18\Components\ registry subset: