AutoIT Script for creating the Computer Restore Point
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=C:\Program Files (x86)\AutoIt3\Icons\au3.ico
#AutoIt3Wrapper_Outfile=..\Create-Restore-Point-Drive-C.Exe
#AutoIt3Wrapper_Res_Description=Enables the Computer Restore Point & Creates the initial restore point
#AutoIt3Wrapper_Res_Fileversion=1.0.0.3
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Res_CompanyName=ABC Gmbh
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.14.5
Author: Anup Chhetri <anupchhetri@abc.com>
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#include <MsgBoxConstants.au3>
; This script will enable the computer restore point to the freshly installed PCs/Laptop
; Also the initial restore point (OOTB) will be created
; Enable Computer Restore Option for Drive C:\
RunWait("powershell.exe -Command enable-computerrestore -drive 'C:\' | Set-Content -Encoding utf8 ")
; Change System Restore Point Creation Frequency
RegistrySet()
Func RegistrySet()
; Write a single REG_DWORD value to the key "SystemRestorePointCreationFrequency".
RegWrite("HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore", "SystemRestorePointCreationFrequency", "REG_DWORD", "0")
EndFunc ;==> End RegistrySet
; Create Restore Point
RunWait("powershell.exe -Command Checkpoint-Computer -description 'Initial Restore Point' -restorepointtype 'Modify_Settings' | Set-Content -Encoding utf8 ")
; Print the result
;~ if @error <> 0 then MsgBox($MB_ICONERROR, "RestorePoint Drive C:", "RestorePoint Creation Failed ! ")
;~ if @error = 0 then MsgBox($MB_ICONINFORMATION, "RestorePoint Drive C:", "RestorePoint Created.")
This AutoIt script can be compiled as exe and run in any windows sytem.