In-depth application of Windows file protection features

  
        Starting with Windows 2000, Microsoft introduced the "Windows File Protection" feature. WFP runs automatically in the background, which prevents important system files from being replaced, greatly improving the stability of the system. But do you know how to use this function better? How to save disk space by limiting its buffer size and allowing multiple systems to share protected files? How do I get it to scan system files each time I start the system? Mastered these, we can ......

First, the principle of file protection mechanisms when

to install new software on your computer, system files and device driver files are sometimes not signed or Incompatible version coverage, resulting in system instability. The system files and device driver files provided with Windows XP are Microsoft digitally signed, which indicates that these files are original unmodified system files, or they have been approved by Microsoft for Windows.

WFP is how to play a role in it? Originally, when important system files (including sys, dll, ocx, ttf, fon, exe, etc.) were replaced or moved, WFP verified the digital signature of the new file to determine if the new file version is correct. Microsoft version, if the file version is incorrect, Windows File Protection will automatically call the DLLCache folder or the backup file stored in Windows to replace the file. If Windows File Protection cannot locate the corresponding file, the system will prompt the user to enter the location or insert the installation. CD, as shown in Figure 1.



Second, the file protection mechanism System File Checker

Windows is automatic, in fact, we can by means of system files

The System File Checker (SFC) controls the file protection mechanism. Here, we will introduce SFC first, and specific examples will be explained below.

SFC corresponding application called sfc.exe, you can find traces of it in the \\ Windows \\ system32 \\ under. Using it, once a protected system file is found to be replaced or moved, SFC will automatically restore the corresponding file from the \\Windows\\System32\\DLLCache\\ folder (Windows XP with SP2 installed, 2169 in its DLLCache folder) An important file that occupies as much as 364.5MB).

SFC has a lot of parameters, use these parameters, you can better control the file protection.

Third, I call the shots File Protection

Next, we come to understand several key parameters useful form by SFC instance: a

instance: every time you start Scanning

By default, Windows File Protection does not scan those protected files all the time. If you are using a public computer, it is still safe, in "Start → Run" In the dialog box, type "gpedit.msc", open the "Local Computer Policy→Computer Configuration→Administrative Templates→System" window, find the "Windows File Protection" group, and double-click the "Set Windows File Protection Scan" item in the right pane. As shown in Figure 2, set it to "Enabled" and set the scan frequency to "Scan during startup", so that as long as Windows starts, it will scan the protected file, so the system will be much more stable, but the disadvantage is that the startup time will be Prolonged appropriately.
Alternatively, you can also open the "Registry Editor", find the SFCDisable value in the right pane of [HKEY_LOCAL_MacHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon], the default setting is 0, that is, after restarting Scan the protected file, we can set it to 1 for the same purpose.

Example 2: My site is my master

By default, Widnows will store the verified file version in the DLLCache folder. The default size of this folder is 400MB. Windows Server 2003 does not have this limitation, which means that the maximum space is allowed. If your hard disk space is tight, you may want to consider the appropriate restrictions.

Still open the "Local Computer Policy → Computer Configuration → Administrative Templates → System" window, find the "Windows File Protection" group, double-click the "Restrict Windows File Protection Cache Size" item in the right pane, in the figure 3 settings in the window, note that the minimum value should be greater than 50MB, if you need to indicate that the cache size is not limited, please select "4294967295" as the maximum amount of disk space.
Alternatively, you can also open the "Registry Editor", find the SFCQuota value in the right pane of [HKEY_LOCAL_MacHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon], the default size is 0xFFFFFFFF (ie 4294967295, 400MB).



Example 3: Empty the DLLCache folder

If your system is working fine at all, there is no problem, and for some reason you need to free up more free space. , then you can empty the Dllcache folder by typing the "SFC /purgecache" command in the "Start → Run" dialog box. Note that there is a space character in the English half-width before it will clear the file cache saved in the DLLCache.

But this way, if there are problems, we will see the window shown in Figure 1, you need to insert the Windows installation CD, and restore the appropriate system files from above.

Four examples: On the File Scan also to schedule the task

routine, we either performed manually SFC, it will either set to perform every time you start the system, in fact, these two methods are too Too much dull, why not make a plan for document scanning?

First of all, we need to figure 2 in "Setting up Windows File Protection Scan" item is set to "disabled", then open the Scheduled Tasks window in the "Control Panel", double-click "Add Scheduled Task" Navigate to \\Windows\\system32\\sfc.exe and select "Weekly", then select the start time and the specific date, then set the username and password.

Right-click on the scheduled task you just created and open the Properties window. As shown in Figure 4, add a space and /scannow parameter in the Run box to immediately scan all protected system files. At the specified time, the file scan operation will be performed automatically.

instance Five: file sharing system protection also play

By default, Windows will from

\\ WINDOWS \\ SYSTEM32 \\ read the protected files DLLCACHE in fact, we You can open the "Registry Editor", navigate to [HKEY_LOCAL_MacHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\WinLogon], find the SFCDllCacheDir key, point it to a larger partition (such as d:\\dllcache), or In a network shared folder (such as \\\\server\\share\\dllcache), then move all the files (folders) under \\WINDOWS\\SYSTEM32\\DLLCACHE to the above folder, so Windows will restore protection from these folders. file.

Tips

★This tip is only for Windows 2000, not for Windows XP.

★ If your company have multiple machines, you can dllcache folder into a shared folder, so you can save hard disk space. If you have different versions of Windows, you need to specify different folders, such as \\\\server\\share\\en\\dllcache, \\\\server\\share\\chs\\dllcache, and so on.

Examples VI: Let stationed in hard disk installation

if prompt shown in Figure 1 is inserted things often encountered Windows installation disc, always very troublesome. However, we only need to create a folder on a non-system partition (such as D:\\), such as WININS, and then copy all the files on the Windows 2000/XP installation CD to this folder. Next, install TweakUI, then open the "Control Panel", double-click the "User Interface Customization" icon, click the "My Computer" tab, and drop down the list box next to "Folder Name" in the "Special Folders" option group. Select the "Installation Path" item and click the "Change Location" button. From the "Browse for Folder" window that opens, select the path where we copy the installation CD, such as D:\\WININS (Figure 5).


Tips

★The hard disk is very large now, it is recommended that you copy the Office installer from the CD to the hard disk and then install it, so you will no longer need to add or remove Office components. Insert the installation disc.

Example 7: Installation CD is also shared

If you work in the company's LAN, you can open the "Registry Editor", navigate to

[HKEY_LOCAL_MacHINE\\ Find the SourcePath item under Software\\Microsoft\\Windows\\CurrentVersion\\Setup], double-click it, change it to a network shared folder, such as \\\\server\\share\\chs\\winxp, and then copy all the files on the Windows XP installation CD to Under \\\\server\\share\\chs\\winxp, when you need a Windows installation file in the future, it will automatically copy files from this folder without prompting to insert the installation CD. In this way, colleagues can save enough local hard disk space and "share" an installation folder.

Copyright © Windows knowledge All Rights Reserved