November 17, 2008

Registry Tip and Trick


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. You then have to close the program and tell XP again to shut down. It's a fairly pointless warning—better 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.
2. Disable XP Shutdown
There may be times when you want to make sure that XP can't be inadvertently shut down. You can use a Registry hack to disable the normal Shut Down. 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 in order 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-Delete or right-clicking on the Toolbar, choosing Task Manager, and then using the Task Manager's Shut Down menu to close Windows. If you want to reenable normal shutdowns, delete the NoClose value.
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.
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 may 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.
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 may 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 TweakUI.
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.
7. Allow Laptops to Enter Power-Saving State (Increase the USB Polling Interval)
Some laptops' processors may not be able to enter their power-saving state, even when they're idle, because USB polling fools the processor into thinking that 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 that polling. The problem is that some laptop processors won't go into their power-saving state because the constant polling makes it think that 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\ControlClass{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 may need to reboot for the new setting to go into effect. You also may need to try several different values until you find one that works.

No comments: