系统还原是(System Restore)Windows 操作系统(Windows OS)中最重要但被低估的功能之一。还原点可以帮助计算机立即恢复工作状态,并节省大量用于故障排除的时间。系统还原点将(System Restore Points)常驻程序、它们的设置和Windows 注册表(Windows Registry)捕获为映像,并备份一些必要的东西,以便在您选择返回时重建系统驱动器。虽然 Windows会经常创建系统还原点,但如果您希望可以让您的Windows PC 在预定时间创建它们。
(Create System Restore Points)每天或每周自动创建系统还原点
我希望Windows有一个内置的功能或设置,用户可以轻松地将他们的 PC 设置为创建还原点,每天或每周都可以轻松单击,但没有这样的设置可用。您将不得不使用任务计划程序(Task Scheduler)来完成这项工作。现在让我们看看如何在特定时间安排一个。这是一个 3 步过程:
- 启用系统还原功能
- 系统还原点命令
- 在任务计划程序中创建任务。
我们还讨论了如何手动运行任务以确认其工作以及创建该任务快捷方式的快速教程。它可以让您快速创建还原点(Restore)。
1]启用系统还原功能
虽然它应该默认打开,但最好检查它是否已禁用系统还原(check if it System Restore has been disabled)。您还必须为单个驱动器配置系统还原(System Restore for the individual drive),包括磁盘使用选项。( disk usage option.)
Windows只允许在 24 小时内创建一次系统还原(create System Restore only once in 24 hours)。如果它再次尝试,它将跳过。因此,如果您计划创建多个还原点,有时是手动创建,那么我们需要消除此限制。
打开注册表编辑器并导航到以下键:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore
双击编辑 SystemRestorePointCreationFrequency DWORD。将值修改为0。
这将确保Windows永远不会跳过创建还原点。
2]系统还原点命令
我们将用来创建还原点的命令是
Checkpoint-Computer -Description "TWC-RestorePoint" -RestorePointType MODIFY_SETTINGS
您可以将名称TWC-RestorePoint更改为其他名称。
MODIFY_SETTINGS是一种还原点(Restore),包括注册表(Registry)、本地配置文件、com+ DB、WFP.dll、IIS数据库和文件扩展名。
我建议您在PowerShell上执行此命令以确保其正常工作。
这是我们建议的命令的快速演示。请注意,它使用描述 - (Notice)TWC-RestorePoint创建了一个还原点。
除此之外,您还可以使用以下参数:
- APPLICATION_INSTALL
- APPLICATION_UNINSTALL
- DEVICE_DRIVER_INSTALL
- CANCELLED_OPERATION
您还可以将以下参数与WMIC.EXE一起使用来创建还原点。我们在关于如何(How)使用Windows 启动自动创建还原点的帖子中对此进行了详细解释。
/Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "Startup Restore Point", 100, 7
3]创建任务计划程序
现在,您将必须 创建和安排一个基本任务,并在(create & schedule a basic task)PowerShell的任务计划程序中使用上面提到的命令
在运行(Run)提示中键入taskschd.msc并按(taskschd.msc)Enter键打开任务计划程序(Task Scheduler)。单击创建任务链接。(Click on the Create Task link.)将其命名为还原点创建者, (Restore Point Creator, )然后选中以最高权限运行(Run)的框。
如果计算机上有多个用户,请选择显示用户是否登录的运行(Run whether the user is logged on or not.)单选按钮。
切换到Triggers选项卡,然后单击New Button。在这里,我们将安排任务每天运行一次,(schedule the task to run once every day,)或者您可以选择其他任何您想要的。选择每天,设置开始日期和时间。
切换到操作选项卡(Actions Tab),然后单击新建按钮(New Button)。在这里,我们将添加命令。
在Program/script框中键入powershell.exe 。在参数(Argument)框中键入以下内容:
Checkpoint-Computer -Description "TWC-RestorePoint" -RestorePointType MODIFY_SETTINGS
单击确定按钮。
接下来,如果您在笔记本电脑上进行配置,请切换到条件选项卡。(Conditions)您可以选择在使用电池运行时跳过创建还原点,或者在切换到电池时停止创建还原点。
最后,切换到设置(Settings)选项卡。在这里,您应该配置如果任务失败或由于计算机关闭而丢失会发生什么。它还可以处理任务失败等情况。
如果您已将其配置为在用户未登录时运行,系统将提示您输入密码。如果您使用的是Microsoft帐户,那么我建议您创建一个本地管理员帐户,并将其用于需要密码的设置。
手动运行任务以检查它是否有效
选择我们创建的任务,然后在右侧面板上单击“运行”(Run)按钮。它将立即启动PowerShell并执行命令。
阅读(Read):如何创建系统还原桌面快捷方式(How to create a System Restore desktop shortcut)。
为系统还原任务(System Restore Task)创建快捷方式(Shortcut)以随时运行
程序 schtasks.exe 负责在适当的时候执行任务。我们可以使用下面的参数来创建一个桌面快捷方式来按需运行它。在我们的例子中,它看起来像这样:
C:\Windows\System32\schtasks.exe /run /tn "Restore Point Creator"
- 右键单击桌面
- 选择新建 > 快捷方式
- 在该位置,粘贴上述命令
- 给它一个名字,然后单击确定。
现在,下次您更改可能使用问题的内容时,请使用此快捷方式创建还原。
在此,我们不仅学会了在Windows 10中安排(Windows 10)系统还原点(System Restore),而且还可以随时使用快捷方式创建它。请记住,每次创建还原点时,都会占用部分存储空间。虽然Windows会在达到分配的磁盘空间限制时自动删除旧的还原点,但您也可以手动删除旧的还原点。(delete older restore points manually.)
How to schedule System Restore Points in Windows 11/10
System Restore is one of the most crucial but underrated features in Windows OS. A restore point can help the computer get back to a working condition in no time, and save a lot of time that goes into troubleshooting. System Restore Points capture resident program, their settings, and Windows Registry as an image and back up a few things that are necessary to reconstruct the system drive to the point if you opt to go back. While Windows creates System Restore Points frequently if you wish you can make your Windows PC create them at scheduled times.
Create System Restore Points automatically every day or week
I wish Windows had an inbuilt feature or setting, where users could easily set their PC to create restore points, daily or weekly easily with a click – but there is no such setting available. You will have to use the Task Scheduler to get this done. Now let us see how to schedule one at a particular time. It is a 3-step process:
- Enable System Restore Feature
- System Restore point Command
- Create a Task in Task Scheduler.
We have also talked about how to manually run the task to confirm its working and a quick tutorial to create a shortcut to that task. It will let you create Restore point quickly.
1] Enable System Restore Feature
While it should on by default, but it’s a good idea to check if it System Restore has been disabled. You will also have to configure System Restore for the individual drive, including the disk usage option.
Windows allows one to create System Restore only once in 24 hours. If it makes another attempt, it will skip. So, if you are planning to create multiple restore points, sometimes manually, then we need to remove this limitation.
Open Registry Editor and navigate to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore
Double click to edit SystemRestorePointCreationFrequency DWORD. Modify the value to 0.
This will make sure that Windows doesn’t skip creating a restore point ever.
2] System Restore Point Command
The command which we will use to create the restore point is
Checkpoint-Computer -Description "TWC-RestorePoint" -RestorePointType MODIFY_SETTINGS
You may change the name TWC-RestorePoint to anything else.
MODIFY_SETTINGS is a type of Restore point which includes Registry, local profiles, com+ DB, WFP.dll, IIS database, and file extensions.
I would recommend you execute this command on PowerShell to make sure it works properly.
Here is a quick demo of the command we suggested. Notice that it created a restore point with the description — TWC-RestorePoint.
Apart from this, you can also use the following arguments:
- APPLICATION_INSTALL
- APPLICATION_UNINSTALL
- DEVICE_DRIVER_INSTALL
- CANCELLED_OPERATION
You can also use the following argument with WMIC.EXE to create a restore point. We have explained this in detail in our post on How to automatically create a restore point with Windows Startup.
/Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "Startup Restore Point", 100, 7
3] Create Task Scheduler
Now you will have to create & schedule a basic task and use the command mentioned above in the task scheduler with PowerShell
Type taskschd.msc in the Run prompt and hit the Enter key to open the Task Scheduler. Click on the Create Task link. Name it as Restore Point Creator, and check the box which says Run with highest privileges.
If there are multiple users on the computer, select the radio button which says Run whether the user is logged on or not.
Switch to Triggers tab, and click on the New Button. Here we will schedule the task to run once every day, or you can choose anything else you wish. Select daily, set the start date, and time.
Switch to Actions Tab, and click on the New Button. Here we will add the command.
Type powershell.exe in the Program/script box. In the Argument box type the following:
Checkpoint-Computer -Description "TWC-RestorePoint" -RestorePointType MODIFY_SETTINGS
Click on the OK button.
Next, switch to the Conditions tab if you are configuring this on a laptop. You can choose to skip creating a restore point if it is running on battery or stop if it switches to battery.
Lastly, switch to the Settings tab. Here you should configure on what happens if the task fails or if it misses as the computer was off. It can also take care of the situations in case the task fails, and so on.
If you have configured it to run even when the user is not logged in, you will be prompted to enter the password. If you are using a Microsoft account, then I will suggest that you create a local admin account, and use it for such settings where a password is needed.
Manually run the Task to check if it works
Select the task we created, and on the right panel, click on the Run button. It will instantly launch PowerShell and execute the command.
Read: How to create a System Restore desktop shortcut.
Create a Shortcut for the System Restore Task to run it anytime
The program, schtasks.exe, is responsible for executing the tasks when its time. We can use the following argument to create a desktop shortcut to run it on demand. In our case, it will look like this:
C:\Windows\System32\schtasks.exe /run /tn "Restore Point Creator"
- Right-click on the desktop
- Select New > Shortcut
- In the location, paste the above-stated command
- Give it a name, and click OK.
Now the next time you change something which can use an issue, create a restore using this shortcut.
In this, not only we have learned to schedule System Restore Points in Windows 10 but also create it anytime want using the shortcut. Do remember that every time you create a restore point, it will occupy part of the storage space. While Windows will automatically delete old restore points when the allocated disk space limit is reached, you can also delete older restore points manually.