Windows XP Hacks, Second Edition
|
Hack 84. Hack Away at the RegistryHere are eight great hacks that use the Registry to do their magic. You'll find dozens of Registry hacks sprinkled throughout this book, but to give you a sense of the breadth of the kinds of hacks you can accomplish using the Registry, I've included a wide-ranging sample of Registry hacks here as well. 9.3.1. Automatically Close Programs at Shutdown
When you shut down Windows, if you have any programs running you'll get a message box warning you that a program is still running. Then you have to close the program and tell XP again to shut down. It's a fairly pointless warningbetter yet would be if XP automatically killed the programs without issuing the warning. That way, you wouldn't get error messages and wouldn't have to close each individual application before shutting down your computer. To have XP automatically close programs at shutdown, run the Registry Editor and go to HKEY_CURRENT_USER\Control Panel\Desktop. Edit the AutoEndTasks key so that is has a value of 1. If the key doesn't exist, create it as a DWORD value and give it the value of 1. To disable it, either delete the key, or set the value to 0. 9.3.2. Disable XP Shutdown
There might be times when you want to make sure XP can't be inadvertently shut down. You can use a Registry hack to disable the normal shutdown. Run the Registry Editor and go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer. Create a new DWORD value named NoClose with a data value of 1. Exit the Registry and reboot for the change to take effect. You won't be able to shut down Windows in the normal manner from now on; you'll have to run Task Manager by pressing Ctrl-Alt-Del or right-clicking the toolbar, choosing Task Manager, and then using the Task Manager's Shut Down menu to close Windows. If you want to re-enable normal shutdowns, delete the NoClose value. 9.3.3. Change the Names of the Registered User and Company
When you install XP or when it comes factory-fresh on a PC, a username and company name are entered as the owner of the system. And that's the way it stays, like it or not. But a Registry hack will let you change both. Run the Registry Editor, go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion, and look for the values RegisteredOwner and RegisteredOrganization. Edit their value data to whatever username and company name you want. 9.3.4. Change the Amount of Time Before Programs Time Out
When an application hangs and no longer responds, XP displays a dialog box that prompts you to kill the application or wait a while longer. By default, the dialog box appears after the application hasn't responded for five seconds. This can cause problems. For example, if a program is doing heavy-duty calculations in the background, it won't respond until the calculation is done, so the operating system will report that the application is hung, even though it isn't. You can use a Registry hack to increase or decrease the amount of time it takes before XP reports that the program has hung. Run the Registry Editor and go to HKEY_CURRENT_USER\Control Panel\Desktop. Select the HungAppTimeout entry and edit it to input a new value in milliseconds. The default is 5000. Exit the Registry. You might need to reboot for the new setting to take effect. Try increasing the number in increments of 1,000 until you find a number that works. 9.3.5. Disable the Disk Cleanup Warning
If your hard disk has what XP decides is too little space left on it, the operating system will pop up a warning and recommend that you run Disk Cleanup. But you might be like me and not want a virtual nanny nagging you to clean up your mess. You can turn off the warning with a Registry hack. Run the Registry Editor and go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer. Create a DWORD value called NoLowDiskSpaceChecks and give it a value of 1. Exit the Registry and reboot. You can also do this by using Tweak UI [Hack #8]. 9.3.6. Change the Default Location for Installing Programs
XP uses the C:\Program Files directory as the default base directory into which new programs are installed. However, you can change the default installation drive and/or directory by using a Registry hack. Run the Registry Editor and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion. Look for the value named ProgramFilesDir. By default, the value will be C:\Program Files. Edit the value to any valid drive or folder; XP will use that new location as the default installation directory for new programs. 9.3.7. Allow Laptops to Enter Power-Saving State (Increase the USB Polling Interval)
Some laptops' processors might not be able to enter their power-saving state, even when they're idle, because USB polling fools the processor into thinking the laptop is active. Your system polls your USB ports once every millisecond to see whether a device is present. So, even if a device isn't present, it continues polling. The problem is that some laptop processors won't go into their power-saving state because the constant polling makes them think the laptop is active. With a Registry hack, you can increase the polling interval from the default of one millisecond, letting the processor enter its power-saving state. Run the Registry Editor and go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}\0000. Create the new DWORD value IdleEnable and set the data value to a number between 2 and 5. This will set the polling interval in milliseconds. If there are additional subkeys for HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000} (such as 0001, 0002, etc.), repeat the procedure and create the IdleEnable DWORD in each of them. Exit the Registry. You might need to reboot for the new setting to go into effect. You also might need to try several different values until you find one that works. 9.3.8. Change the Size of Your Mouse and Keyboard Buffer
You sometimes can get an error message telling you that you have an overflow in your mouse buffer or keyboard buffer. When that happens, it means the buffer isn't large enough and you need to increase its size. To increase your mouse buffer, run the Registry Editor, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Mouclass\Parameters and find the MouseDataQueueSize subkey. The default setting is 100 (64 hex). Increase the decimal number to increase the size of the buffer; then exit the Registry and reboot. You might need to try several different settings until you find the right one. To increase the keyboard buffer, look for the KeyboardDataQueueSize subkey in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Kbdclass\Parameters. The default setting is 100 (64 hex). Increase the number to increase the size of the buffer; then exit the Registry and reboot. Again, you might need to try several different settings until you find the right one. |
|