Windows

10 common 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.

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.

  1. Exit the Registry Editor and reboot the computer.
  2. When the machine reboots, enable offline files.
  3. 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.

40 comments
SHCA
SHCA

On my Vista Business 32-bit laptop, I followed all of the instructions in the article, including disabling offline files, rebooting, changing the registry as instructed, rebooting, enabling offline files, and rebooting. To my surprise, on the last reboot, my offline files were listed as they had been at the start, without me doing anything. Judging by the disk use statistics, I don't think my 5GB of offline files have moved. Is there a way I can tell which drive the offline files are now on? Is there a folder I can look for on C: or D:?

Chaz Chance#
Chaz Chance#

Being a little old-fashioned, I prefer to have explorer show a folder tree structure rather than the default "open" mode which just shows the contents of the current folder. Its annoying that double-clicking on "My computer" gets an "open" style Explorer. A simple change to make "explore" the default in XP is to: Select "Folder options" from the "Tools" menu. Select the "File types" tab. Select the type "[NONE] Folder" (not "file folder") Click the "Advanced" button and click on "explore". Click the "Set default" button, and "explore" is now shown in bold. In a fresh install none are set as the default. Some programs may set their own preferences. Once a default has been set, you can't go back to no default, only choose another type as a default.

sura.jan
sura.jan

I was very glad to have found this way (point 1.) how to disable annoying AutoPlay about 3 years ago. I am very satisfied with it. Any other settings in Windows were not stable - after some time Autoplay started again (maybe after Windows Update). I have similar problem with "Hide underlined letters for keyboard navigation..." in the Display settings (Appearance - Efects). I always uncheck it (not to hide) and after some time it is checked again. Annoying, I still haven't found solution - maybe registry again.

ramdouk
ramdouk

Hi, I have been having this issue since a year now, but cannot seem to resolve it. Whenever a folder is opened, the options on the right pane (Name, Type, Date Modified, Folder, Tags, Rating, etc) display options that are completely irrelevant. How can I restrict this to display only the standard options like Name, Type, Size, Date Modified. I have tried setting the folder options to windows classic, but it only applies to a single folder, but its lost on restart. I wish Microsoft go bust just for this. Please help.

ideason88
ideason88

Vista has a nifty feature (accessible through Control Panel > Hardware and Sound > AutoPlay) that gives you a drop-down menu of choices for each type of device based on content. There is also a check-box at the top left of this dialog to turn autoplay on of off.

gstitch
gstitch

You do realize that a number of these options can be easier set through a group policy, or a local security policy....right?

Euan_
Euan_

There are a few we use when setting up lab environments, but I wouldn't be without this one. [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt] @="Command Prompt" [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\Command] @="cmd.exe /k cd %1"

ted
ted

What other values can be used to control Autoplay? Is there a source for more information on the effects of entries in NoDriveTypeAutoRun other than to turn this off?

Jacky Howe
Jacky Howe

When running software from a USB device to remove a Virus from an infected System, sometimes the USB drive has no small switch for write protection or you might be using and External drive. You can overcome this by turning on write protection through the Registry via Command Line before inserting the USB drive. Service Pack 2 is required for XP and this setting will have an immediate effect. REG ADD HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies /v WriteProtect /t REG_DWORD /d 1 /f and to turn it off reg delete HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies /f A System restart is required to remove the Write protection.

masungit
masungit

this one is good, but as we all know playing with the registry values are somehow risky, so always backup or take note of the changes.

john3347
john3347

Right click the header bar. (has the column headings listed). This opens a window that lists the properties that are listed. Click "more" that appears at the bottom of that list and select the properties that you wish to view and de-select the properties that you wish not to view. You can also set the order that they are arranged in from left to right on that same screen. Hope this was the issue you were trying to address. [This is one of a few good, useful feature that Windows 7 failed to take away from us.] Now, I need the required registry hack or third party software that will allow me to arrange icons within a folder in the order that I prefer. For instance: I have a desktop shortcut to Microsoft Office. Within that shortcut, I have shortcuts to Word, Publisher, Visio, Powerpoint, ...etc. Windows 7 has decided that I may only have these icons arranged alphabetically. Windows 7 is full of Baby Poo on that issue. I want to arrange MY icons in the order of frequency of MY use of these applications. Can anyone provide a hack or third party software that will allow me to arrange my icons the way I want my icons arranged? [This is one of the many, many good, useful features that windows 7 DID take away from us.] (Edited to correct wrong mouse click information. Right click is correct.)

Gis Bun
Gis Bun

I've seen this as well. Changing details and make it the default - for some reason - doesn't always work. Seems it doesn't remember the folder settings. Who the h?ll wants ratings?

TonytheTiger
TonytheTiger

and you'll notice all the properties, some of then checked. Un-check the ones you don't want. You might have to click "more" to get to some of them.

mattohare
mattohare

until it gets to the bit of code that checks the setting.

dcrist
dcrist

We use this on servers. By default the size of the scheduled task log file is 32K. We use this to change it to 1MB. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SchedulingAgent] "MaxLogSizeKB"=dword:00000400

figmentKLM
figmentKLM

Easy to do yourself from Windows XP Just go to "Tools"/"Folder Options..." from within any open Windows folder. Click the "File Types" tab. Click "Folder" from within the "File Types" list, then click the "Advanced" button. Now click the "New..." button. Type "Open Command Window From Here", (or whatever you want) in the "Action" text box and C:\Windows\System32\cmd.exe in the "Application used to perform action" text box. Now click the next three "OK" buttons and your good to go. Any folder you right-click on in any directory will have the "Open Command Window From Here" option.

leo8888
leo8888

I've been using those for quite some time, very handy and worth the mention

Euan_
Euan_

It adds "Command Prompt" to the explorer context menu, which opens cmd.exe at the current directory level when clicked. The default string on the first key is what is displayed in the context menu. The default string on the second key is the action which is performed when the command is clicked. If you wish it to be more descriptive for the user, you could change the default string on the first key from "Command Prompt" to a more descriptive "Open Command Prompt Here".

lochalan
lochalan

I'm curious to find how you utilize these in your labs. What do these registry tweaks do? We have several labs on our campus that I'm in charge of and I'm ALWAYS on the look out for useful tips!

ideason88
ideason88

Just how does this change the auto play option or context menu?

1ntense
1ntense

If a drive is formatted to FAT or NTFS the Autoplay menu is displayed but if for CD's this is different, they can actually bypass autoplay and immediatly begin to run a program. I know this is possible to do because my mobile broadband dongle has a small CDFS partition, which immediately runs the program, but does anyone know a utility whereby you can partition a flashdrive to CDFS? And once partitioned would you need to 'burn' to it using Nero or like?

casone
casone

Nice! This link was very helpful. I didn't know that they were still doing this.

csmith.kaze
csmith.kaze

TweakUI needs to be ported to Vista. Or hopefully they will add it to Windows 7 at the very least.

computab
computab

Does anyone have the info to increase the number of recent documents shown in the Start menu please?

Samuel Leung
Samuel Leung

Slightly related.. you might like to try this to stop virus's. If you don't like your USB drive to be Autorun on insertion on ANY computer you can create a folder (yes a folder, not a file) on the root of the USB drive and name it Autorun.inf. Now when you insert your USB key, it wont be allowed to Autorun, saving it from nasty virus's but more importantly saving it from spreading any virus spawned by autorun.inf commands

Second and Goal
Second and Goal

This one may have since been exposed in a UI, but I've been doing it as a reg hack for years. The "your password will expire in n days" warning has always annoyed the hell out of me, especially in security-conscious environments where frequent password changes are required, and the default value of 14 days for a warning is used. To fix it, create a value called "PasswordExpiryWarning" under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon You can then set the warning threshold to however many days you want. I typically use 4, makes sure I get adequate warning over a long weekend.

mattohare
mattohare

I used the UI (control panel in this case) to turn off the user account control. Registry hacks work on the underlying setting. The UI will ensure that's propagated to other areas where its needed.

Ron_007
Ron_007

john, there is a simple fix to your problem I've been using for since the days of the dino's. Make the brain dead defaults work you. Simply prefix the file/shortcut names with a number or better yet, shifted number char(s) like @ or #. Granted, some char aren't allowed in file names, but there are still enough special char to take care of your needs. You pick the characters based on the sort order you want to force. For a folder with few entries a single prefix char will do the trick, for larger folders you may have to go to 2 or 3 char.

Data Ninja
Data Ninja

If you'd like explorer to apply those settings you change to all folders, you can select the "view" tab on the folder options property sheets and select "like current folder". This will reset all folder properties to the current folder's settings - at least OS'es through XP, not sure if Vista still has that option...

kidtree
kidtree

I've always thought there should be a way to do that.

awgiedawgie
awgiedawgie

Preventing autorun will not prevent a virus from detecting the newly inserted drive and writing to it anyway.

ramdouk
ramdouk

Forgot to mention, I had tried all the right click options and apply to folders..vista cannot remember them in my next session.

Danno3
Danno3

In vista, you can accomplish the equivalent of 'like current folder' in XP. From the View menu, choose Customize This Folder, then choose Documents as template and check the box to apply to subfolders.

Samuel Leung
Samuel Leung

My work invironment is Windows XP and I have only ever set this via a Windows XP workstation. So my workings are a bit conflicting to yours. Once applied it should stop Autorun from any pc. That said do not confuse Autorun with Autoplay. But for me it stopped Autoplay as well. Also, this setting should not really be OS specific as it's applied to the USB key, not the OS.

Samuel Leung
Samuel Leung

Make sure file extentions ARE shown. Open my computer -> Tools -> Folder Options -> View -> (UNTICK) High File Extensions for Known File Types. Before creating the Autorun.inf folder. Once this is done, create the folder with the .inf extention.. So you want a folder called "Autorun.INF". You will know this has applied correctly by unplugging your USB and plugging it back in.. If the drive does not Automatically appear but shows up in My Computer. You're a grinner.

Samuel Leung
Samuel Leung

Let me check my workings.. ;-) Was a few months ago I did it so I might have missed something crucial in those instructions.