Page 1 sur 1

Tuyaux d'optimisation de la Base de Registre (XP)

MessagePosté: 28 Mai 2005, 12:29
de Marc76

Ce message fait suite à un sujet que j'avais lancé sur les .reg. En voici, in extenso, le contenu.

(PS : si des personnes éprouvent des difficultés à comprendre, dîtes-le, je traduirais les passages concernés).

XP Operating System Guide & Internet Tweaking

This Windows XP tweaking guide was compiled from many sources that all reference to the 32-bit version of XP. Whilst these tweaks may work for the 64-bit version, I have not testing nor checked in the registry if the associated keys actually exist. Furthermore I do not guarantee any or all of the tweaks outlined in this guide as they are simply a collection of tweaks that have come from many sources. Due to the fact that I originally compiled this for personal use I am unable to reference the original source of the information contained in this guide. I am not claiming to be the author of the content; I simply compiled it from many sources which are all too hard to reference.

Most of the tweaks and changes are based around Windows Registry. The registry should not be played with, only advanced users should modify the registry. Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk. The registry consists of five major categories, each is called a KEY and each contains SUBKEYS, which in turn contain values.
-HKEY_CLASSES_ROOT key stores classification data, typically file extensions and components.
-HKEY_CURRENT_USER is a copy of the current user’s data from the HKEY_USERS key. This is used as a quick reference point.
-HKEY_LOCAL_MACHINE contains settings about installed hardware and software.
-HKEY_USERS contains all user related information and settings.
-HKEY_CURRENT_CONFIG key is a copy of the active configuration in HKEY_LOCAL_MACHINE\Config, for quick reference.


Edit the file allocation sizes in NTFS
NTFS lets smaller files be stored directly in the file allocation table for fast access. However, if you store a lot of files on a disk that is very small, or very few files which are very large, you may want to change the default NTFS allocation behaviour.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\FileSystem and ADD the DWORD NtfsMftZoneReservation; with the following decimal value:

1 – Many files with small file sizes (small meaning less than the default block size, typically 4,096 bytes, this value is set when formatting the drive, if you have used windows installation and formatted the drive from a boot cd, then the block size will equal 4,096)
2 – Many files with normal file sizes (normal meaning bigger than the default block size.
3 – Few files with big sizes.
4 – Very few files with very big sizes

Turn off last access time stamp for NTFS
All files stored in NTFS partitions keep a timestamp attribute for the last time they were accessed (read or write). Since updating this timestamp adds to drive tasks and can slow things down, you can turn it off if it is not crucial (and rarely it is, unless you are paranoid, or need high security).

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem and ADD or SET the DWORD NtfsDisableLastAccessUpdate and set it to 1.

Clearing out the Prefetch cache
In the \Windows\Prefetch directory contains cached versions of common-accessed files. Delete the contents of this folder every 3 months or so and reboot. This way fresh copies of all the most commonly accessed files are kept there, which will result in faster boot times and load times. Initially this will not be the case as new information is copied there.

Increase I/O page locking limit
Windows XP and 2000 are set to “lock” a certain number of bytes for I/O operations. By default this amount is set very low and should be set in relation to the amount of RAM you have in your system. This will allow pretty much everything to run faster.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\MemoryManagement and ADD or SET the DWORD IoPageLockLimit and set it to one of the following decimal values. 4096, 8192, 16384, 32768, 65536, 131072, 262144. All of these values are kilobytes. The appropriate setting is one-fourth of the system’s memory as expressed in kilobytes – so if you have 512MB RAM, the setting should be 131,072.

** Please note: There are NO Windows Based Knowledge Articles (WBKA) which make any reference to this tweak/registry setting. There are some sources that believe that this setting does not apply to anything after the first release of windows 2000.

Bump up your system cache size
A system with 256MB of RAM or more will generally benefit from having large cache turned on.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\Memory Management and ADD or SET the DWORD LargeSystemCache and set it to 1.

Note: You must first check on-line if you have ATI graphics card/drivers. Some ATI graphics cards have issues with any increased cache settings. This setting is ideal for a server and may actually reduce your performance.

Set IRQ Priority timers
Certain interrupts are more important than others; you can set OS to give certain IRQs a higher priority than others. This often increases system responsiveness.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\PriorityControl and ADD the DWORD IRQ#Priority and set it to 1. Where # is equal to the IRQ you want to assign the enhanced priority to. Suggested IRQs to add by default are 0, being the standard timer (one windows uses).

Note: There are sources that say there is no evidence this tweak works and also say that there is no MS documentation to support it. Whilst I can not unequivocally say that it does/does not work, I understand that Windows uses the standard timer (usually IRQ0) for its purposes not the CMOS (IRQ8).

Modify the default worker thread settings
A machine that is placed under unusually heavy load conditions quite often will benefit from having more system worker threads, which perform things like cleaning up after a process quits running.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\Executive and ADD or SET the DWORD named AdditionalCriticalWorkerThreads and set it (decimal) to 16.

Process Quanta settings
This is an expert setting, however can be experimented with to find which works best for you. The length of time which Windows executes one thread before it can switch to another thread is referred to as a quantum. These intervals can be fixed or variable, short or long, and can be biased towards foreground or background threads. e.g. if you have a server that runs primarily background processes, you want the system to favour those and use long-fixed-length timeslices to let everything run in as much a parallel fashion as possible. An ideal setting for a workstation would be to use 3:1 ration, fixed lengths and longer intervals (a setting of 26). However, testing what works best for you is advisable.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\PriorityControl and SET the Win32PrioritySeparation in decimal. This value is a bitmask, so the setting can be a little tricky. Start with a value of 0 and add the following values to your number.

Foreground to Background ratio;
3:1 add 2
2:1 add 1
1:1 add 0
Lengths of the quanta to be;
Variable lengths, add 4
Fixed lengths, add 8
Intervals of the quanta to be;
Shorter, add 32
Longer, add 16

Get services & applications to time out faster
One of the common causes of slow shutdowns is system services that refuse to “die” efficiently. Windows keeps an internal timer of how long to wait for a service to shut down before killing it manually. The default value is 10,000 or 10 seconds; set this to 2,000 or even 1,000. Two low a value may be problematic, however, so try 2,000 first.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control and EDIT the DWORD WaitToKillServiceTimeout and set it to 2,000
HKEY_USERS\Default\Control Panel\Desktop and EDIT the REG_SZ WaitToKillAppTimeout and set it to 2,000
HKEY_USERS\Default\Control Panel\Desktop and EDIT or ADD the REG_SZ AutoEndTasks and set it to 1
HKEY_USERS\Default\Control Panel\Desktop and EDIT or ADD the REG_SZ HungAppTimeout and set it to 2,000
Cutting unwanted services
When windows starts up it loads a wide range of applications, some a system critical and others are just running in case you need them. Disabling those you don’t need considerably frees up resources for the applications you do use and also improves security. To stop a service, go to Start > Control Panel > Administrative Tools > Computer Management > Services. If you right click on a particular service and select properties, you’ll be able to Disable or Enable a service as well as (Stop, Start & Restart). It is always advisable to stop the service before disabling it. Most of the services listed below are NOT required by the average workstation.

Alerter: Allows you to receive administrative updates from other systems. Is not required by any applications.
Background Intelligent Transfer Service (BITS): Transfers updates to your system when your connection is idle. While good in theory is has been quite buggy and has serious security issues. You can always enable this when performing Windows Updates, otherwise keep it disabled whenever the computer is not performing this task.
Clipbook Service: Rarely used service for copying and pasting data across systems, a standalone computer will never have a use for this service.
Distributed Transaction Coordinator Service: Ensures that network links on an NTFS file system remain valid. Completely unnecessary service.
DNS Client Service: Caches DNS queries
Error Reporting Service: Triggers a pop-up message every time a program crashes.
Fast User Switching Compatibility Service: Allows you to suspend the current session and log in as another user.
Indexing Service: Provides indexing feature for faster searching of local files, if searching is rarely performed it is much better to switch this off.
Messenger Service: Similar to the Alerter and frequently used for sending spam.
MS Software Shadow Copy Provider Service: Allows features in the rarely used MSBackup archive utility.
Netmeeting Remote Desktop Sharing: Used for the remote assistance function in NetMeeting and Windows Messenger.
Netlogon: Allows you to logon to a Domain, if you are not on a domain or don’t need to logon to a domain, then disable this one.
Network DDE Service: Used to support the Clipbook service
Network DDE DSDM Service: Used to support the Clipbook service
NT LM Security Support Provider Service: Provider for the Telnet service and Messaging Queuing.
Performance Logs and Alerts: Allows the perfmon app to capture and log data.
Remote Desktop Help Session Manager: Controls remote assistance.
Routing and Remote Access Service: Allows remote clients to dial in to your PC for connection to your LAN or WAN.
Smart Card Service & Smart Card Helper Service: Allows smart cards to work.
SSDP Discovery Service: Enables the discovery of UPnP devices on the network. This is especially not required once your network has been setup.
Themes Service: Gives Windows XP its skinned look. Disabling this will change the GUI to “old style” windows.
Telnet Service: an insecure facility for remote login.
Uninterruptible Power Supply Service: Allows a UPS to shut down the system gracefully if there is a power outage. Obviously this is not needed if you do not have a UPS.
Upload Manager Service: Allows for non-user file transfer scheduling.
Volume Shadow Copy Service: A feature of the rarely used MSBackup utility.
WebClient Service: Provides WebDAV intergration in the Explorer shell.
Windows Time Service: Allows for the automatic update of the system time, and thus maintains a connection to a Windows/Microsoft Server.
Wireless Zero Configuration Service: Allows for the easy connection of a wireless adaptor to a wireless network. This is NOT required to set up a wireless network, simply makes the task less onerous.

Increase Speed by Tweaking the Pretcher
This is a unique technique for XP, which could improve the performance significantly by tweaking the prefetcher settings, which is the cache folder that XP uses to slipstream frequently used tasks.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters\EnablePrefetcher and set it to either 0-Disable, 1-Application Launch Prefetch, 2-Boot Launch Prefetch, 3-Both ("3" is recommended & default setting). Note: I have seen guides/people use settings such as 4 or 5, what they are I am not sure, however, I have read in a few places that there is no documentation to support it and my understanding is that MS states the only valid settings to be 0,1,2,3.

Disable User Tracking
This prevents the system from tracking the programs users run, the paths they navigate, and the documents they open. The system uses this information to customize Windows features. As a result, the system disables customized menus and other features that require user tracking information. Switching this off should improve performance.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer and EDIT or ADD the DWORD NoInstrumentation and set it to 1 for disable, 0 to enable

Registry hacks for faster networks and internet performance
The default network settings in all versions of windows are far from optimal. Part of this is because there is no way of knowing what kind of network Windows will be connecting to out-of-the-box, be it dial-up, broadband or a LAN connection with bridging to an internet connection, again be it dial-up or broadband.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\ and EDIT or ADD the DWORD TcpWindowSize and set it to 65,535 for dial-up, and 256,960 for broadband.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\ and EDIT or ADD the DWORD DefaultTTL and set it to 64 on all systems.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\ and EDIT or ADD the DWORD EnablePMTUDiscovery and set it to 0 for dial-up and 1 for broadband.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\<adapter>\Parameters\ and EDIT or ADD the DWORD TcpipMTU and set it to 1,500, unless you are using PPPoE over DSL – in which case use 1,492 or less. The <adapter> setting may vary from system to system.

Denial of Service Attacks (DOS)
If you have any broadband internet your adapter directly connects to the internet and you are susceptible to Denial of Service attacks. Whilst DOS attacks are usually targeted towards commercial web servers, it is not uncommon for unprotected home pc’s to be targets. These few registry tweaks will toughen up the TCP/IP stack as a defence to such antics. Whilst not foolproof, it will make things trickier for the baddies.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\ and EDIT or ADD the DWORD EnableDeadGWDetect and set it to 0. This prevents detecting a dead gateway in the event that no response is received. (i.e. it will increase the effectiveness of firewall security.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\ and EDIT or ADD the DWORD EnableCMPRedirect and set it to 0. This prevents windows from changing its routing table in response to ICMP redirect messages.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\ and EDIT or ADD the DWORD EnablePMTUDiscover and set it to 0. By disabling MTU discovery this could prevent a hacker from changing the MTU to a tiny size and cause the stack to overload.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\ and EDIT or ADD the DWORD KeepAliveTime and set it to 300,000. This changes the duration between sending of keep-alive packets.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\ and EDIT or ADD the DWORD NoNameReleaseOnDemand and set it to 1. This provides protection from instances of NetBIOS name-release assaults.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\ and EDIT or ADD the DWORD PerformRouterDiscovery and set it to 0. This stops a hacker from adding default route entries by spoofing IRDP routing advertisements.

Load web pages faster
By default the windows internet stack can only open two connections to a web server at a time. This setting allows you to open multiple connections at once, which can speed up loading web pages dramatically.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings\ and EDIT or ADD the DWORD MaxConnectionsPerServer and set it to 10 or 20, you can play around with this setting to find what works best for you.

Faster Networking
There is ‘feature’ in all 32-bit flavours of Windows, which causes Explorer and IE to scan remote computers or shared files/folders over networks. This feature is related to scheduled tasks and is nothing more than a pain in the butt. You can speed up your network, especially connection to and perhaps internet browsing by going to;

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace find and delete the key names;

Disable unneeded network services and removing QoS Bandwidth
Within the properties of your Network connection disable NetBIOS and Quality of Service (QoS) Packet Scheduler. These are both not needed and only waste bandwidth.

Furthermore, by default windows reserves 20% of the connection bandwidth for QoS traffic, this is the case regardless of whether QoS is activated or not.

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Psched and EDIT or ADD the DWORD NonBestEffortLimit and set it to 0

Enable network card process offloading
Some network cards have onboard processors that take some of the burden of handling network traffic away from the CPU. Windows XP does not take advantage of this by default.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\ and EDIT or ADD the DWORD DisableTaskOffload and set it to 0

Speed up browsing with DNS catch
When you connect to a web site your computer sends information back and forth, this is obvious. Some of this information deals with resolving the site name to an IP address, the stuff that TCP/IP really deals with, not words. This is DNS information and is used so that you will not need to ask for the site location each and every time you visit the site. Although WinXP and Win2000 has a pretty efficient DNS cache, you can increase its overall performance by increasing its size.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters and EDIT or ADD the DWORDS

"CacheHashTableBucketSize" = dword:00000001
"CacheHashTableSize" = dword:00000180
"MaxCacheEntryTtlLimit" = dword:0000fa00
"MaxSOACacheEntryTtlLimit" = dword:0000012d

Increase network redirector buffers
Windows 2000 & XP by default reserve 15 buffers for increasing network performance. Raising the number of buffers can often increase network throughput as well.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters\ and EDIT or ADD two DWORDS MaxCmds & MaxThreads and set them both to 100.


Speed up the Start Menu’s Display
If you want the submenus in the Start menu to spring open faster, navigate to;

HKEY_CURRENT_USER\Control Panel\Desktop and EDIT or the DWORD MenuShowDelay; it’s default setting is 400, as in 4/10ths of a second, you can use any setting you like, or 0 for them to open instantly.

Change the size and image quality of Explorer Thumbnails
If you have lots of directories with lots of images in them you may want to cut down the amount of time it takes explorer to build thumbnails, not only do they generate faster but they take up less space. Conversely you can do the opposite.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer and EDIT the DWORD ThumbnailQuality and set it to 50 for low quality images and 100 for high quality images.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer and EDIT the DWORD ThumbnailSize and set it to 32 for example and the thumbnails will be 32x32.

Run Explorer in a separate process
If explorer crashes on you frequently, because of buggy add-ons or it just plain crashes a lot, you can run each Explorer window in its own separate process to keep Explorer from bringing everything else down with it.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced and EDIT or ADD the DWORD SeparateProcess and set it to 1.
Disable 8.3 name creation
By Default, an NTFS volume will use the legacy 8.3 file name convention in association with the long filenames we’ve grown accustomed to. However, this can slow down accessing data on a volume with this legacy support enables, not to mention that 8.3 file names are just plain annoying. If you aren’t using any 16-bit applications, disabling this support will give you a performance boost.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem and ADD a DWORD NtfsDisable8dot3NameCreation and set it to 1.

Useful Administrative Shortcuts
Users & Groups – lusrmgr.msc
Device Manager – devmgmt.msc
Component Services – comexp.msc
Event Viewer – eventvwr.msc
Shared Folders – fsmgmt.msc
Group Policies – gpedit.msc Performance Monitor – perfmon.msc
Disk Defrag – dfrg.msc
Local Security Settings – secpol.msc
Resultant Set of Policies – rsop.msc
Disk Management – diskmgmt.msc
Services – services.msc

Specify source path for XP installation files
Instead of having to insert the windows XP installation cd whenever you make modifications to the windows installation you can copy the \i386 directory from the installation cd and modify the registry so that windows knows where to look.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup and ADD or EDIT a REG_SZ with the value name SourcePath and set the value data to the location of the copied \i386 directory.

Launch Programs at Login without the Startup Folder
This is good for both adding and removing the startup of applications that don’t appear in the startup folder. To remove, simply delete the associated key, to add;

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run and ADD REG_SZ with the value name <program executable> and set the value data to the location of the program executable.

Specify whether you use the Classic logon screen or the Welcome splash screen
This allows you to choose whether you use the windows XP welcome login screen or the classic windows 2000 style login screen.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon and ADD or EDIT the DWORD LogonType and set it to 1 for welcome screen and 0 for classic logon.

When using the classic logon screen you can specify the text in the logon screen, useful for adding information that may be required.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon and ADD or EDIT the REG_SZ LogonPrompt and enter the text as the value data.

Customize the Logon Box Message
The message is displayed in the classic logon box, not the XP ‘Welcome’ screen

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon and EDIT or ADD the REG_SZ LogonPrompt and set it to the message you want.

Disabling the Windows Burning function
Due to the fact that most people use 3rd party burning programs it is a good idea to disable cd burning within windows.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer and ADD the DWORD NoCDBurning and set it to 1.

Disabling CD Autorun
Due to the fact that this feature is more of an annoyance rather than help you may want to disable it.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdrom and ADD or EDIT the DWORD AutoRun and set it to 0 to disable or 1 to enable.

Barebones Windows XP Startup
If for whatever reason you want to startup windows with only the services required for the operating kernel you can run MSCONFIG.MSC, click on the startup tab and select HIDE ALL MICROSOFT SERVICES and click on DISABLE ALL. This will start only the system services and applications resulting in a very fast logon/startup. Note: this setting is not advised and is only for individual use as all Anti-Virus / Display apps etc will not work.

100% CPU usage when clicking on AVI files
When you are playing around with AVI files, for some reason (if the file is corrupted or windows just wants to play silly buggers) explorer will use 100 cpu time, and the only way to fix this stupid problem is a system reboot when it is certain it will return when you play around with your AVI files again.

Browse to HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\shellex\PropertyHandler and then delete the default value which should be; {87D62D94-71B3-4b9a-9489-5FE685ODC73E}

Remove the stupid search assistant
Click Start, Run and enter %systemroot%\inf, and click ok. Locate the file srchasst.inf and hurt it.

Fixing windows when it reboots instead of shutting down
On certain machines exiting Windows lands you in a “reboot loop” instead of turning off the computer. To fix this, browse to

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer and ADD or SET the DWORD CleanShutdown and set it to 1.

Remove Windows Messenger
If you do not use Windows Messenger then why not uninstall it. Better yet, you may use a 3rd party client program such as Trillian and not desire to have Windows Messenger permanently installed. To uninstall it:

1. Go to Add or Remove Programs, Add/Remove Windows Components, REMOVE the checkmark next to Windows Messenger, click Next then Finish and Reboot.
2. Run RunDll32 advpack.dll,LaunchINFSection %windir%\INF\msmsgs.inf,BLC.Remove, then click OK.

You should see the progress bar delete related files and then ask you to reboot the system.

Speed Up Windows Explorer and desktop screen refresh
All X-Setup Plug-ins > Appearance > Explorer > Settings > Explorer Options > check box that says Enable fast update and apply changes. Be sure to uncheck the other 2 options if you do not want to use them.

Stop Windows from looking for Scheduled Tasks when browsing network
All X-Setup Plug-ins > Network > Explorer > Remote Computers Special Folders > uncheck "Show Scheduled Tasks" when viewing network computers. If you don't have a shared network printer then uncheck the other box too. Apply changes.

Disable Low Disk Space Notification
This setting controls whether you receive a "Low Disk Space" warning when free disk space reaches less than 200 megabytes
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer and EDIT or ADD the DWORD NoLowDiskSpaceChecks and set it to 1
Disable Error Reporting
Does what you would expect

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting and EDIT the DWORD DoReport and set it to 0