Windows

Common Windows issues you can fix with a registry hack

Sometimes, configuring Windows to meet your needs requires a trip to the registry editor. Here's a look at some simple hacks that can save you time and prevent a variety of problems.
If you read any article that involves editing the registry, you will no doubt see ominous warnings telling you that you can destroy Windows and/or your applications if you edit the registry incorrectly and that you should always make a full system backup before performing a registry modification. While these statements may be true, the fact remains that there are things that you can do by editing the registry that you simply cannot do with the GUI. In this article, I want to share with you 10 handy registry hacks for Windows XP and Vista.

Note: This article is also available as a PDF download.

1: Disable AutoPlay

I always find it a bit annoying to insert a TechNet CD and have Windows open Internet Explorer and display a bunch of information I don't care about. I would rather just be able to navigate through the disc's file system and go directly to what I need. Fortunately, it's easy to create a registry setting that disables AutoPlay:

  1. Navigate through the Registry Editor to HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer.
  2. Create a DWORD named NoDriveTypeAutoRun.
  3. Set the value to 000000FF.

2: Increase the maximum number of simultaneous downloads

As a technical writer, I'm constantly downloading files. Sometimes I need to download a lot of files, and Windows' limit on the number of files that can be downloaded simultaneously gets in the way. If you're in the same boat, you can tweak the registry so that Windows will let you download 10 files at a time:

  1. Navigate through the Registry Editor to HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings.
  2. Create a new DWORD named MaxConnectionsPerServer and assign it a value of 0000000a.
  3. Create a new DWORD named MaxConnectionsPer1_0Server and assign it a value of 0000000a.

3: Change the name of the registered user

When you install Windows, you're prompted to enter a username and a company name. But since it's fairly common for companies to merge, you may want to change the name of the company Windows is registered to by using this hack:

  1. Navigate through the Registry Editor to HKLM\Software\Microsoft\Windows NT\CurrentVersion.
  2. Change the values that are assigned to the RegisteredOwner and RegisteredOrganization keys to reflect the new ownership information.

4: Prevent the Recycle Bin from being deleted

If you've ever right-clicked on the Windows Recycle Bin, you know there's a Delete option, which can be used to get rid of it. If you want to prevent the Recycle Bin from accidental deletion, follow these steps:

  1. Navigate through the Registry Editor to HKCR\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}.
  2. Create a new registry key called Shell.
  3. Create a new registry key named Delete and put it beneath the Shell key. The path should look like this: HKCR\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\Shell\Delete.
  4. Modify the Default key and assign it a value of Recycle Bin.

5: Eliminate cached logons

Windows is designed to allow users to log on using cached logins if no domain controller is available to authenticate the request. If you want to make sure that a login request is always authenticated by a domain controller, you could change the number of cached logons that are allowed from 10 to 0 (or you could increase the number of cached logins allowed to 50). To do so, follow these steps:

  1. Navigate through the Registry Editor to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\winlogon.
  2. Create a new REG_SZ setting named CachedLogonsCount.
  3. Assign this new setting a value that reflects how many concurrent cached logins you want to allow.

6: Encrypt and decrypt from a shortcut menu

Normally, when you want to encrypt or decrypt a file in XP Pro or Vista, you just right-click on the file or folder and choose the Properties command from the shortcut menu. When the properties sheet appears, click the Advanced button on the General tab and then use either the Encrypt or the Decrypt option.

If all that seems like a lot of work, you can add those options to the shortcut menu you see when you right-click on a file:

  1. Navigate through the Registry Editor to HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced.
  2. Create a new DWORD called EncryptionContextMenu and assign it a value of 1.

7: Delay Windows Activation

Typically, when an organization deploys Vista, it will create a master image, run SYSPREP, and deploy the image. The problem is that it might be a while between the time that SYSPREP is run and when Vista is actually deployed.

Microsoft will allow you to extend the activation period by 30 days, but you can do that only three times. You can, however, use a registry hack to get around this limitation:

  1. Navigate through the registry to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL.
  2. Change the value associated with the SkipRearm key to 1.
  3. Open a Command Prompt window and enter the following command: slmgr -rearm.

8: Relocate your offline files

When you use Vista's Offline Files feature, the offline file cache is automatically placed on your C: drive. But my laptop has two hard drives in it, and I wanted to configure Vista to place my offline files onto my secondary hard drive. I accomplished the task by following these steps:

  1. Open the Control Panel and click on the Network and Internet link, followed by the Offline Files link. Windows will display the Offline Files properties sheet.
  2. Disable offline files if they are currently enabled.
  3. Click OK and reboot the machine.
  4. When the computer reboots, open the Registry Editor and navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\CSC.
  5. Create a new string value named Parameters.
  6. Assign this value to the Parameters key: \??\e:\csc, where e: is the drive letter you want to use.
  7. Exit the Registry Editor and reboot the computer.
  8. When the machine reboots, enable offline files.
  9. Reboot the computer one last time. Now, you can start making folders available offline.

9: Disable User Account Control

One of the things about Vista that seems to irritate a lot of people is the User Account Control feature. In essence, an administrator is treated as a standard user. Administrators who attempt to perform an administrative action receive a prompt asking whether they initiated the action. I think that this prompt is a valuable safeguard against malware, but since a lot of people don't like it, here's how to use the registry editor to suppress the prompt:

  1. Navigate through the registry editor to HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System.
  2. Change the value of the ConcentPromptBehaviorAdmin key to 00000000.

10: Don't display the last user who logged in

Windows Vista is designed so that when you press Ctrl+Alt+Delete to log in, it will display the name of the user who logged in most recently. This can be a bit of a problem if multiple users share a common PC. They may forget to check to see who was logged in previously and key in their own password in association with another user's login name. If they try this enough times, they could lock the other user out. You can get around this problem by using a simple registry tweak to tell Windows not to display the name of the user who was logged in previously:

  1. Navigate through the Registry Editor to HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System.
  2. Set the DontDisplayLastName key to a value of 1.

Your turn...

What problems or annoyances have you overcome with the help of a little registry tweak? Share your favorite hacks below.


Finally: 10 Things... the newsletter!

Get the key facts on a wide range of technologies, techniques, strategies, and skills with the help of the concise need-to-know lists featured in TechRepublic's 10 Things newsletter, delivered every Friday. Automatically sign up today.

About

Brien Posey is a seven-time Microsoft MVP. He has written thousands of articles and written or contributed to dozens of books on a variety of IT subjects.

33 comments
JandNL
JandNL

I am not an expert at editing the registry, and Windows Vista Home Premium SP2's registry does not look like or operate as this article indicates. Please provide more specific and clearer information!

PeterM42
PeterM42

To ensure Numlock comes ON when you boot/login: [HKEY_CURRENT_USER\Control Panel\Keyboard] "InitialKeyboardIndicators" = "2" [HKEY_USERS\.DEFAULT\Control Panel\Keyboard] "InitialKeyboardIndicators" = "2"

dhamilt01
dhamilt01

How do you rid of the aphabetical sort of Recent Items on the Start Menu? When you right-click Recent Items and click on Sort, it must set a bit in the registry somewhere. How do you reset that bit?

chriscol
chriscol

How about a hack to reset the mouse so both left and right buttons act like left buttons. I bought a kidzmouse for the grandkids, and that worked just fine, until I upgraded to Vista. Seems to me that if one can reverse a mouse from left to right, one could also set it so both buttons did a left-click. Can anyone help with this?

darrell2010thomas
darrell2010thomas

you only need to press start then click on default programs then once you have done that then click on change autoplay setting the once you have clicked that then scroll down and press resett all defaults and then press save and thats it you can put in a cd and then its up to you where you go and that windows will not open the cd unless you goto my computer then you open the cd yourself thats it you dont need to put in a registry hack to do this ok people as i dont think you should be messing with the registry if you dont know what you are doing ok people

an909
an909

Your 10th recommendation, "Don't display the last user who logged in", was very helpful. You claim that this fix applies to Vista systems, but will it also apply to XP SP3 systems?

jpmigue
jpmigue

I haven't but I would pay for a solution to the pop-up "Windows is trying to find a solution". Useless and pointless...

Mason.Paul
Mason.Paul

Stopping the dam anoying pop-up bubbles Speedup menu resopnse times Adding the select all to the right click context menu I did have notes for all of these and a lot more for XP but lost them. Some did work on Vista but not all

Neon Samurai
Neon Samurai

At login, a user can choose the domain to connect to but by default, the last domain used is displayed. Is there a registry hack that sets a default domain to display regardless of what previous user domain was used?

Juanita Marquez
Juanita Marquez

Adobe, Java, other stuff that won't quite die on startup, even when told to do so in the regular interfaces, benefit from a minor tweak in the registry.

Who Am I Really
Who Am I Really

I only hack the registry when I can't do the deed with the Group Policy & Security Policy editors or with other types of tools such as TweakUI for XP or as in an XP homeless situation where neither GPedit or SecPol is available or there is no specific policy to change ie. - disable autoplay is easily accomplished with Group Policy editor in win2K, XP-Pro there are 2 settings for this a> the first is in Computer Configuration and b> the other is in User Configuration

Mark W. Kaelin
Mark W. Kaelin

When was the last time you felt the need to hack the Windows registry file? What was the hack?

komokozie
komokozie

I don't know about the reg hack to stop this, but for XP, I can atleast tell ya how & where [if u don't already know), where to 'clean out' that list, which is actually a 'folder', that's easy enough to get to and work with. (must be the/an Admin Acct/Logon) First go into Windows/Explorer Navigate to the *Root*:\Docs&Settings {{ from here, you have be able to 'see' 'all' of the next folders. These are where the 'LogOn Profiles' are stored. You need to see several profile names listed here.}} So to make sure you can... Click 'Tools' on the File Menu at the top, then Click 'Folder Options'. Click the 'View' TaB at the top. Make sure the Radio Button is selected for 'Show hidden files and folders'. Click 'Apply' then 'OK'. [[If you are NOT logged on as an Admin you will get or have already gotten an Error saying "Changes will not be saved.. Get an Admin" (or whatever). Then 'you' can't do this, and an Admin has to.]] Now 'Double Click' the 'Folder' (Profile Name) of the 'Recent Docs' mentioned. There you should see a folder named 'My Recent Documents'. 'Double Click'.. and that's the storage spot for the 'Recent Docs' Listing that shows on the 'Start Menu'. ("Tid-Bit" - Windows alphabetizes them in the listing, but, they are chosen arbitrarily) If you want the list 'clean', just 'Select All' and 'Delete', and the 'Start Menu List' is clean. V'iola! A semi-little 'trick' from here could be... To have a 'shortcut' to that folder on the Desktop for easy access ... to 'clean out' whenever you want :-) (or where ever is convenient)(which can also be renamed anything you want!). First go UP/Back '1' level so you can see all the Profile folders. 'Right-Click' the 'My Recent Documents' folder and then Click 'Properties'. Remove the Tick (check mark) from 'Hidden' at the bottom. Then 'Apply' and then 'OK' {If you want to RE-Hide everything else then go back to 'Tools' (read above) and select 'Do NOT show hidden files and folders'. Then Click 'Apply' then 'OK'.} Now just 'Right-Click' on the folder 'My Recent Documents', and goto 'Send To' and 'Desktop' .. (or just 'Right-Click' and choose 'Copy'. Now close all, and get back to the 'Desktop'. 'Right-Click' (a blank spot) and 'Paste as Shortcut'. You will now find the Icon/Folder 'Shortcut to My Recent Documents'. Rename it something else (if you want). Now you can just open this folder and clear it anytime, like, before you log off, shut down, ... or walk away.

nsaliba
nsaliba

Go to control Panel Mouse properties Change the Right button from Right-Click (Default) to Click.(Click the small arrow and choose Click instead of Right-Click(Default)

DNSB
DNSB

That hack works for XP. Also for 2000 and NT 4.0. It might have worked for earlier versions but 4.0 was the first version I used on workstations and wanted to remove the last user display.

Jellimonsta
Jellimonsta

Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon subkey. Double-click DefaultDomainName (or create a new String named this, if it doesn't exist), and set the value to the preferred domain. Double-click AltDefaultDomainName (or create a new String named this, if it doesn't exist), and set the value to the preferred domain. Make sure you backup the registry. ;)

bookkeeper
bookkeeper

I agree with this if you have any info on what this hack is please let me know thanks. Signed Totally agree

Mason.Paul
Mason.Paul

This is part of V-com fix-it-utilites Pro 10 there is probably some freware that is avable to do the same and it will most probably be in most of the other similar programs out there as well

CrowdedCranium
CrowdedCranium

To sterilise a Protexis infection that was foisted off on my machine by COREL!

ScienceMikey
ScienceMikey

While the tips you present are useful and effective when applied manually, several of them (and MANY more) can be achieved through simpler means. To start, I use ERUNT to back up the Registry before I do ANYTHING else. I then use xp-AntiSpy to apply several of the mentioned tweaks, plus others. xp-AntiSpy works just fine with WinVista and Win7 if the user runs it as Administrator. I use xp-AntiSpy on every Windows PC I touch, to good effect.

dhamilt01
dhamilt01

Thanks for the feedback komokozie. I've read before what you've talked about but my quest is for a a back to a "default" position after windows is installed. I just want to reverse what happens when you click "Sort" in the Recent Entries. That action must turn on/off a bit in the registry that tells Windows to "sort" alphabetically the Recent Entries. So I just want to know what bit it is so I can turn it on/off as required so Windows won't sort any new entries. Too bad Microsoft didn't have the forsite to include a selection titled "Undo Sort".

chriscol
chriscol

Only the option to switch right and left button functions. I'm thinking I could do it with a registry hack, but I'm not that sophisticated.

an909
an909

I wish I had considered this solution years ago. It would have saved years of headaches resetting my admin password after users locked my account after attempting to access systems with their password.

Neon Samurai
Neon Samurai

The first time I went hunting in the registry, I must have read "altdefault" to mean "secondary in the pulldown". Setting both keys to the desired default domain worked like a charm. Thank you. (edit): It apears I did try changing both registry entries in the past. I spoke to soon. Logging into the secondary domain resets both registry keys to that secondary domain. I want the login prompt to always default to the primary domain leaving me to select the secondary when applicable. User's log in under the primary domain while I do some admin work under the secondary. Any time I log out I either have to take the extra step of logging in with the primary domain or get a "it won't let me log in" call because the users rarely check the name field let alone the "log in to" field. Flicking hell. How is this not a simple configuration setting in Windows?

Neon Samurai
Neon Samurai

I've been into that branch of the registry before but I don't believe I had the second domainname value. There's a VM waiting at work for tomorrow morning.

seanferd
seanferd

Apps and app updaters that start with Windows would start from one of the Run keys, for example: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run , or from that folder named Startup in your Start menu. As noted above, Autoruns from Sysinternals does a good job of grouping and displaying such things, and will allow you to disable, delete, or jump to a file, registry entry, or other setting. http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx They have scads of other cool tools, but as with Autoruns, don't mess with stuff you don't understand. A lot of it is fairly easy to understand, just do a little research first. So, if you use Autoruns, you want to look under the Logon tab for the Run entries. Disable rather than delete - it is easier to enable the item than learn to manually create a key or reinstall an application if you want it back.

Juanita Marquez
Juanita Marquez

but basically, you delete the autostarts, then change the binary on the specific .exes to the other setting. If you aren't familiar with what I'm talking about, I highly suggest you get someone familiar with the registry to do this for you. Corrupting your registry is serious stuff.

Juanita Marquez
Juanita Marquez

I've never used software to control those things because some of them can be disastrous and I know exactly where to go. Not saying the software doesn't have its place, I just have trust issues when it comes to essentially performing lobotomies on my computer.

Neon Samurai
Neon Samurai

As I mentioned, the issue is that I use one domain to log in for some admin tasks while all the users are contained inside another domain. I want to use local admin when working on the local machine (perhaps more of a *nix habit) rather than dirty the domain admin account our support contractor uses. For now, I'm back to remembering the log out of local admin and into domain admin before shutting down just so I can force the default back to what the user's expect.

Jellimonsta
Jellimonsta

I had never actually tried it. :( Do the users have need to actually log in to multiple domains? If not you could possibly change the ShowLogonOptions DWORD to 0 in that same subkey, and not even have option to change domain?

Mason.Paul
Mason.Paul

I've never had any problems with this software as ther is a guid icons OK, User Choise Not recomeded, and some short advice and discription of waht the program that runs at startup dose or is acssoiated with such as cameras, scanner and printer.