SoFunction
Updated on 2025-04-14

I'll teach you the system performance optimization registry modification example (1)

About file association function optimization

When you have installed many application software in your system, it is inevitable that there will be several software that can open the same file format. At this time, you may want to choose which software to open it yourself, or you may want to change the opening method during use. This not only prevents you from not being able to open a certain file when an application software is damaged, but also allows you to choose the opening method that you feel most satisfied with. Then, you can make corresponding changes in the registry.


First, you can confirm a way to open a file, that is, specify it in the registry. For example, you want to specify that MP3 files be opened with foobar instead of the default Windows Media Player. Open HKEY_CLASSES_ROOT\mp3file\shell\open\command sub-key branch, and change the default value in the right window from the original "C:\Program Files\Windows Media Player\" /prefetch:6 /Open "%L" to "C:\Program Files\Foobar2000\" "%1" (assuming that foobar is installed on the C drive), so the default opening method of MP3 is foobar. Similarly, for other file types, you can also change the file association by finding it under the HKEY_CLASSES_ROOT subkey, opening the shell\open\command subkey branch under it, and changing the association program in the right window. Pay attention to the last "%1" and don't forget.

In addition, you can also add an opening method to a file of a certain format, that is, when the default opening method is left unchanged, there are other opening methods to choose from when right-clicking. This time, we take the html file as an example. Some senior web page producers write directly using code. We can add "Open with Notepad" to the right mouse button of the html file and directly enter the code to modify it. Similarly, find the HKEY_CLASSES_ROOT\htmlfile\shell subkey branch, create a new subkey "QuickEdit" under it, and change its default key value to "Open with Notepad". Under this subkey, create a new subkey "Command", change its default key value to "%1", and launch the registry editor. Then when you right-click the html file, the option "Open with Notepad" will appear. Click to edit the html file directly with Notepad. Similarly, you can add an open method to other files. The process of adding the corresponding file subkey is as follows.


Finally, if you think neither method is convenient enough, you can directly add the "Open Method" option to the right mouse button, so that no matter what file it is, you can freely choose the opening method, and you will no longer have to be troubled by the restrictions of the opening method. Open HKEY_CLASSES_ROOT\*\Shell subkey branch, create a new subkey "OpenWith" under it, set its default key value to "OpenWith", and create a new subkey "Command" under the "OpenWith" subkey, set its default key value to "C:\Windows\System32\, OpenAs_RunDLL %1". In this way, when you right-click any file, you can choose the opening method. Isn't it very convenient?


About disk optimization

●Optimize hard drives:

Open HKEY_LOCAL_MACHINE\System\Current ControlSet\Control\FileSystem subkey branch, create a new binary key value in the window on the right, and name it "NameCache", which is used to set the file name cache of Windows XP. If there are more than 128MB in the system, it can be set to 32MB. You can also create a binary value "PathCache" for Windows XP's path cache, which can also be set to 32MB.

●Implement floppy drive backend writing disk:

Open the HKEY_LOCAL_MACHINE\System\Current ControlSet\Services\Class\fdc subkey branch, and the 0000 key value below points to the first floppy drive and 0001 points to the second floppy drive. Create a new DWORD value under the key value of the floppy drive to be modified, name it ForeFifo, and set the value to 0. In this way, the system can remember the disk write operation and automatically perform the disk write operation when the system is idle.

●Optimize the file system to make the disk faster:

Since some software consumes too much system resources, we can optimize the file system by limiting the resources that each software can consume to improve disk speed. Open HKEY_LOCAL_MACHINE\ System\Current ControlSet\Control  \FileSystem subkey branch, create a new DWORD value in the window on the right, name it "ConfigFileAllocSize", and set its value to decimal 500.

● Establish advanced security mechanisms for disk drives:

Open HKEY_LOCAL_MACHINE\Software\ Microsoft\WindowsNT\CurrentVersion  \Winlogon subkey branch, create a new string-type key-value item in the window on the right, name it "AllocateFloppies", and set its value to 1, so that only the currently logged in user can access the disk drive and its removable media device.