Welcome to my blog Here I will be sharing all the software technologies which I am interested in ...

Saturday, July 18, 2009

Modifying the windows registry

You may ask yourselves, why should this article be any different from all those tweaking tutorials around the Internet or, better yet, why should you read this when you can install a program that does it all for you? Here's why: this article will help you make important changes to your system with just few windows opened, you will be able to choose from a list only the tweaks that you're interested in and then apply them on any computer at any time. Furthermore, you don't have to pay a single cent! Why pay for a program to do what you yourselves can do in just a few seconds? Note that you will require registry editor (available in XP or Vista) and the administrator rights. Go to “Run” and type “regedit.exe”. Most of these settings will take effect immediately but some of them might require a restart.

WARNING: Improperly executed setting could cause strange behavior, and at worst, could even entirely corrupt you Windows installation, requiring you to reinstall Windows. Feel free to try these settings but know what you are doing. As a precaution you may take backup of your registry and create a restore point before proceeding.


1. Command your Windows Explorer to start in the location of your choice

By default, when you access Windows Explorer it will go directly to the My Documents folder. To change this, right click on the icon and replace the Target field with "%SystemRoot%explorer.exe /e, c:". You can make it start in your games folder or any other location. For example, you can instruct it to start directly on My Computer by adding this string: "%SystemRoot%explorer.exe /e,".

2. Teach Windows to automatically log on to your account

Most of you may have realized that Windows does no longer log on directly to your account when you boot the computer. This happens because of the .NET Framework Update from Microsoft that creates an extra user account named ASP.NET. Of course, you would think that the easiest method is not to update the .NET Framework or to delete the newly created account. However, it is better to configure Windows to automatically log on to the user of your choice by using this method.
Go to Start->Run, type "control userpasswords2" and click OK. The "Users" window will appear; select the account you want to automatically log on to then uncheck the "Users must enter

a user name and password to use this computer" option. If you have a password set, type it to complete the process. This setting is available just for Windows XP Professional users.

3. Being a long time user of Windows, you are now aware of the Show Desktop utility function, but back in the past you have removed it from Quick Launch. Don't know how to restore it?

Go to Start->Run and type the command "regsvr32 /n /i:U shell32". The icon will reappear in Quick Launch.

4. Remove the username and picture from the new Windows XP Start Menu

The Windows XP start menu displays your username and a picture at the top. Many complain that they don't want this information to be shown but there is no solution for this. Well, there is, of course without disabling the Welcome Screen and Windows XP Themes.
Go to “C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures”. Inside the folder there is a BMP picture file named after your username. If your name is “XYZ” then the picture file should be named “XYZ.BMP”. Rename it to “XYZ2.BMP”, then rename the following folder: “C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\Default Pictures” to "Old_Default Pictures".

To remove the user name, go to the Registry Editor (Start->Run->regedit) and look for “[HKEY_CURRENT_USER\Software\Microsoft Windows\CurrentVersion\Policies\Explorer]”. In the right panel, set the "NoUserNameInStartMenu" value to 1. After a system reboot, no username or picture will be shown.

5. Windows forgets your Folder settings?

If you are a meticulous person you might like to customize your folders to look nice, changing the view mode, position or display options. After restarting, you realize that everything was in vane, you lost the settings. This is due to the fact that by default Windows XP remembers the settings for at most 400 folders. To solve this go to Registry Editor and look after these keys:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell] and
[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam]. Set the BagMRU Size to 5000 (or up to 8 000). Now it's solved!

6. Set the command prompt to a desired path

When you type CMD in the "Start->Run" window to access the command prompt, you notice that it will go to the user's home directory. To change that, use the Registry Editor to navigate to [HKEY_CURRENT_USER\Software\Microsoft\Command Processor].
In the right panel, look for Autorun. If it misses, create a new REG_SZ and set the folder there, preceded by a CD (as you type in DOS). Example: typing just CD makes the Command Prompt default to C: drive. You can also type "CMD /?" in the Command Prompt for detailed information about its parameters.

7. Unable to preview JPG, GIF and HTM files in the Display Properties dialog

To solve this error type "REGSVR32 /i SHIMGVW.DLL" and "REGSVR32 /i MSHTML.DLL" in Start->Run.

8. Your zip archiver software has expired and after uninstall there is no zip associated program, although Windows can deal with zip archives

Go to Start->Run and type "REGSVR32 ZIPFLDR.DLL" or "cmd /c assoc .zip=CompressedFolder".

9. Load Applications Faster

Navigate to “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\Memory Management\PrefetchParameters”. The default value for “Enable Prefetcher” is 3. Increase the value to 5 to increase the performance.

10. Unload the unused DLL files from memory

After an application is closed the XP just leaves the associated DLL files in memory which ultimately slows down the PC. To correct this navigate to “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\AlwaysUnloadDLL”. If the dword AlwaysUnloadDLL is not present create it and set the value to 1.

11. Run 16 Bit Applications in their own processes

If you have more than one 16 bit application on your 32 bit windows XP (well I’m sure you will be having at least TC or TC++) use this setting. XP run’s all the 16 bit applications as a single process. But performance can be improved by running each 16 bit application as a separate process. To do these navigate to “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\WOW”. Browse the string “DefaultSeparateVDM” and set the value to “Yes”. If it is not present you will need to create it and set the value.

12. Edit the startup program list

Many of the programs which start with windows do not figure in the “startup” folder (located in start menu) or in “msconfig”. You will have to take pain to open each of these program’s settings and disabling them from starting automatically. But wouldn’t it be great if you can check all the startup programs at a single place. Navigate to “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run”. All the startup entries will be listed here. Delete those which you don’t want. Again navigate to “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run” and delete the same entries here also.

13. Enable Automatic Refresh

There is a small delay when some information changes before it is reflected in windows GUI. You have to press F5 to refresh and update the contents. For automatic refresh go to “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Update”. Then change the dword value of “Update mode” from 1 to 0.

14. Control windows automatic restart after a crash

If any serious software or hardware failure occurs, often the window restarts. For troubleshooting purpose it is necessary that the computer does not restart. To enable this go to “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\CrashControl” and change the value of “AutoReboot” to 0 to prevent the automatic restart after crash.

15. Change the location of default folders

Default folders include “My Documents, My Pictures, My Music etc” which are by default stored in “C:\Documents and Settings\\My Documents” but you can change this default path. Navigate to “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders”. Open this registry key and edit full path of the special folder you want to change to a corresponding new path. Note that the path for certain folders like “C:\Windows\” cannot be changed and you should not try to change their path either. It may result the OS to crash.

16. Disable the error messages on booting

This will disable all the messages informing about any device which is not working. You may want to use this when you know that some device is not working and don’t want getting reminded continuously. Go to “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Windows” and set the dword “NoPopupsOnBoot” to 1.

17. Restore folders on startup

If you want to open the folder which you were working upon before shutting down the PC use this setting. Go to “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced” and change the dword value “PersistBrowsers” to 1.

18. Change the owner name and organization name

During installation if you entered a wrong name for the owner and organization and want to correct the mistake then use this setting. Go to “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion” and modify the values of “RegisteredOwner” and “RegisteredOrganization” to the required names.

19. Create your own windows tips

After using XP for sometime you will find that the tooltips it provides are just annoying. You can change these tips with yours. Navigate to “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Tips” and change the tips according to your convenience.

20. Create a folder in My Computer

Whenever we want to create a folder we are required to go to the drive in which the folder is to be created and then to other sub folders if required. Can’t we create a folder in My Computer itself? Yes we can. But the procedure is slightly different. Create a folder anywhere on any drive, say “C:\MyFolder”. Navigate to “HKEY_CLASSES_ROOT\CLSID” in registry editor and create a new key with a Globally Unique Identifier (GUID) and set its value as {FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}. Hence the key value will look like

HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}

Set the value of the “(Default)” setting for this key to the name of the folder say “My Folder”. Create a new sub-key under main key and call it “DefaultIcon” i.e. create a key called

HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}\ DefaultIcon

Set the value of “(Default)” to the path of icon for the folder, say “C:\MyFolder.ico”. If you don’t set the path then default folder icon will be used. Now create another sub-key under the main key called “InProcServer32” i.e. create a key called

HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}\InProcServer32

Set the “(Default)” setting to “shell32.dll”. Create another string value called “ThreadingModel” with value set to “Apartment”. Now create another sub-key called

HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}\Shell\Open My Folder\Command

Set the “(Default)” value to “explorer /root, c:\MyFolder”. Create another set of sub-keys called

HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCF- ABCD1DE12345}\ShellEx\PropertySheetHandlers\{FD4DF9E0- E3DE-11CE-BFCF-ABCD1DE12345}

Then create another sub-key called

HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}\ShellFolder

Under this key, create a new Binary Value called “Attributes” with values “00 00 00 00”. To place the folder in My Computer, add the following key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ Explorer\MyComputer\NameSpace\{FD4DF9E0-E3DE-11CE- BFCF-ABCD1DE12345}

A new folder will be created in My Computer called as MyFolder and it will point to the C:\MyFolder contents. Note that this folder cannot be deleted without reversing the above process.

21. Add “Copy to\Move to” to the context menu

This will add “Copy to and\or Move to” option to right click menu of files and folders. If user selects “Copy to” then a menu asking for the destination folder will appear and file will be copied to the selected folder. Same thing applies for “Move to”, just it will delete the original file. Navigate to “HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers”. Create a new key here called "Copy To". Change the "(default)” value to {C2FBB630-2971-11D1-A18C-00C04FD75D13}. Then, in the same key (HCR\AllFilesystemObjects\shellex\ContextMenuHandlers), create a new key called "Move To". Change its "(default)" value to {C2FBB630-2971-11D1-A18C-00C04FD75D13}.

22. Make your computer pretend not to have a DVD drive

This setting is pretty useful if you have a large CD/DVD collection, you’re away from home, and you don’t want your friends messing with your collection. Go to “HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Player\Settings”. Look for “EnableDVDUI” string value and set its value to “No”. If it doesn’t exists then create and set the value to “No”. Note that this setting depends on the DVD drive and may not work with yours. If this happens just delete this value.

23. Computer is unable to detect the Optical Drive

This might help if your optical drive isn’t being detected. It should also work if your drives have disappeared for no apparent reason, or after various program installations and/or upgrades. Navigate to “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{4D36E965- E325-11CE-BFC1-08002BE10318}”. Delete the values inside the keys UpperFilters and LowerFilters. If that doesn’t seem to work, go ahead and delete the keys themselves.

24. Hide the drives in My Computer

This will disable the display of local and networked drives in My Computer. Go to “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer”. In the right pane, create a new DWORD and name it NoDrives. Modify its value to 03ffffff. To re-enable the display of the drives, simply delete the DWORD you created.

25. Block access to registry editor

This restriction removes the ability to run Microsoft Registry editor. Be careful not to lock yourself out of the Registry, once you enter the following key into the registry, you will not be able to use Regedit to undo the change. So before using this setting create a “.reg” file that will re-enable access to the registry editor. The file should have the value “DisableRegistryTools” set to 0. Go to “HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System”. Create a new DWORD value called DisableRegistryTools and set its value to 1.

26. Disable the Computer Shutdown

This prevents users from being able to shut down the computer. It might be required by the administrators when they are performing an important system task and do not want the users to accidently shutdown the machine. Go to “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer”. Create or modify the DWORD value called NoClose and set it to 1. Again go to “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer” and do same thing their also.

27. Some security settings

Under the following key: “HKEY_CURRENT_USER\Software\Microsoft\CurrentVersion\Policies” there will be a key called Explorer. Under that key, create new DWORD Values and modify their values to 1 to impose the following restrictions. If and when you want to remove these restrictions simply delete the respective DWORD Values, or change their values to 0. Here’s a list of DWORD Values that can be created under the Explorer key:

NoDeletePrinter Disables deletion of already installed printers

NoAddPrinter Disables addition of new printers

NoRun Disables or hides the Run Commands

NoSetFolders Removes folders from the Settings option in the Start Menu (Control Panel, Printers, Taskbar)

NoRecentDocsHistory Removes the Recent Document system folder from the Start Menu

ClearRecentDocsOnExit Clears the Recent Documents system folder on Exit

Under the same key, you can create new sub-keys other than the Explorer key. Create a new sub-key and name it System. Under this key, you can create the following new DWORD values, setting them to 1 for enabling the option and to 0 for disabling it.

NoDispCPL Hides Control Panel

NoDispBackgroundPage Hides the Background page

NoDispScrsavPage Hides the Screen Saver page

NoDispAppearancePage Hides the Appearance page

NoDispSettingsPage Hides the Display Settings page

NoPwdPage Hides Password Change Page

NoAdminPage Hides the Remote Administration page

NoProfilePage Hides the User Profiles page

NoDevMgrPage Hides the Device Manager page

NoConfigPage Hides the Hardware Profiles page

NoFileSysPage Hides the File System button

NoVirtMemPage Hides the Virtual Memory button

28. Disable My Computer properties

This setting will be useful if you don’t want anyone to mess-up your computer and its devices. Go to “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer” and to “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer”. Now set the DWORD Value NoPropertiesMyComputer to 1 to hide the Properties option. Reset it to 0 to re-enable what you disabled.

29. Disable Folder Options

Go to “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ Explorer” and to “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\ Explorer”. Create or modify the DWORD Value called NoFolderOptions, and set it to 1 to hide the Folder Options. Reset it to 0 to enable the options.

30. Disable Right Click on Start Button

Go to “HKEY_CLASSES_ROOT\Directory\shell” and to “HKEY_CLASSES_ROOT \Folder\shell”. For both these keys, rename “shell” to “shell.old”.

31. Clean the Add/Remove programs

Often, when you uninstall a program from the Add/Remove programs and then the application gets uninstalled, but the entry for it remains their. To fix this go to “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”. Find the Application sub-key under this key. There should be at least two entries for each application: “DisplayName”, which shows the name that, is displayed in the Add/Remove Programs list and “UninstallString”, which is the path to the uninstall program. To remove the entry for a specific program from the list, select Application sub-key and simply press [Delete].

32. Associate programs with not-standard extension to notepad

This setting will associate all the non-standard extension files to open with notepad on double click. Go to “HKEY_CLASSES_ROOT\Unknown\shell” and create a new key called “notepad”. Right click this key and create a sub-key called “command”. Now set the “(Default)” String Values of the following as below, without quotes:

HKEY_CLASSES_ROOT\Unknown\shell

“notepad”

HKEY_CLASSES_ROOT\Unknown\shell\notepad:

“Open Using Notepad”

HKEY_CLASSES_ROOT\Unknown\shell\notepad\command:

“C:\WINDOWS\NOTEPAD.EXE %1”

33. Disable Right Click on Desktop and Explorer

Go to “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer” and to “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer”. Set the DWORD Value NoViewContextMenu to 1 to disable right click context menu or to 0 to enable it.

Do add more settings you know to this list and do tell if any setting did'nt worked. Share it with others if it resulted in some serious problem so that it may be removed.



No comments:

Post a Comment