Linux 拨号vps windows公众号手机端

Windows10系统下如何使用CMD开启Windows文件保护

lewis 4年前 (2021-01-25) 阅读数 8 #网络运维

本文目录导读:

  1. <"http://#id1" title="了解Windows文件保护" "">了解Windows文件保护
  2. <"http://#id2" title="使用CMD开启Windows文件保护" "">使用CMD开启Windows文件保护

在Windows 10操作系统中,Windows文件保护(Windows File Protection,简称WFP)是一个重要的安全机制,用于防止系统文件被误删除或替换,当系统检测到关键的系统文件被修改或损坏时,WFP会自动将这些文件恢复到原始状态,从而保护系统的稳定性和安全性,本文将详细介绍如何在Windows 10系统下使用命令提示符(CMD)开启Windows文件保护。

了解Windows文件保护

Windows文件保护旨在防止恶意软件或用户错误地修改重要的系统文件,通过将关键的系统文件设置为只读,并使用还原点来备份这些文件,WFP可以确保这些文件始终处于正确的状态,当系统检测到这些文件被修改时,WFP会自动将它们还原到原始状态。

使用CMD开启Windows文件保护

1、打开命令提示符(CMD)

按下Win键和R键打开运行窗口,输入"cmd",然后点击"确定"。

2、启用Windows文件保护

在命令提示符窗口中,输入以下命令并按Enter键:

sfc /scannow

该命令将扫描系统文件并检查是否存在损坏或丢失的文件,如果检测到任何问题,系统将尝试修复它们。

3、设置系统文件为只读

输入以下命令并按Enter键:

attrib +r "%SystemDrive%\*.dll"
attrib +r "%SystemDrive%\*.exe"
attrib +r "%SystemDrive%\*.ocx"

这些命令将把系统驱动器上的所有DLL、EXE和OCX文件设置为只读属性,从而防止它们被修改。

4、配置还原点

输入以下命令并按Enter键:

wmic baseboard get product,manufacturer,型号,serialnumber /format:htable >"%userprofile%\desktop\hardware.txt"

该命令将收集有关计算机硬件的信息并将其保存到"hardware.txt"文件中,您可以使用以下命令创建还原点:

restorepoint create /name "Windows 10 File Protection" /description "Protect system files from unauthorized changes" /includealldlls /noerr /compensateforformatchange /forceofflinefix /norestore /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores /nospinwaitonrestores /noprogressnotifyonrestores >nul
版权声明

本文仅代表作者观点,不代表米安网络立场。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

热门