Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Released under the GNU General Public License version 3 by J2897.
- @echo OFF
- REM Create a shortcut to this file to quickly create impromptu system restore points.
- REM Simply right-click the shortcut and select 'Run as administrator'.
- REM This saves you from having to keep messing around and looking for GUIs.
- pushd "%~dp0"
- ver | find "Version 6." > nul
- if %ERRORLEVEL%==0 (
- REM Do OPENFILES to check for administrative privileges
- openfiles > nul
- if errorlevel 1 (
- color cf
- echo.
- echo Right-click on this file and select 'Run as administrator'.
- echo.
- pause
- color
- exit /b 1
- )
- )
- REM Create a restore point.
- ::schtasks /run /tn "\Microsoft\Windows\SystemRestore\SR"
- ::https://social.technet.microsoft.com/Forums/windows/en-US/03bd9fe3-0a87-470f-b0d2-79699009dcf4/windows-7-system-restore-automatic-restore-points-not-created
- if not exist CreateSRP.vbs (
- echo Set obj ^= GetObject^( "winmgmts:\\.\root\default:Systemrestore"^) & echo obj.CreateRestorePoint"Impromptu Restore Point",0,100
- )>CreateSRP.vbs
- echo Creating a restore point ...
- start "" CreateSRP.vbs
- REM Wait for a moment to give Windows enough time to create the restore point.
- echo.
- echo It's safe to close this window if you don't need to see the restore points.
- timeout /t 120
- REM Show the restore points.
- if exist "%PROGRAMFILES%\CCleaner\CCleaner.exe" (
- start "" /D "%PROGRAMFILES%\CCleaner\" "%PROGRAMFILES%\CCleaner\CCleaner.exe" /tools
- msg %USERNAME% /time:600 Take a look at CCleaner's System Restore section.
- ) else (
- start "" rstrui.exe
- msg %USERNAME% /time:600 Select 'Choose a different restore point' and click Next. Then tick the box to see all of the restore points.
- )
- popd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement