Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
:: Author: hgate73 at gmail or yahoo
:: Purpose: Reduces the amount of disk space allowed to be used by System Restore
:: Requirements: 1. Run this script with admin privileges
:: 2. reg.exe from Microsoft must be in any of these locations:
:: a) the directory you run this script from
:: b) c:\windows\system32\ (preferred)
:: c) in the PATH variable
:: 3. Put the names of your computers, one per line, in a file called "names.txt" in the same directory as this script
:: Version: 1.0 Initial write
:: Prep
@echo off
title Mass SysRestore Reducer
set VERSION=1.0
set NAMES_FILE=names.txt
cls
:: Manual
:start
echo.
echo Mass SysRestore Reducer
echo.
echo Enter the IP or name of the remote computer, or "autoreduce" to
echo auto-reduce the space used by SysRestore on ALL computers in %NAMES_FILE%
echo.
:loop
@set /P TARGET= Target Computer:
if %TARGET%==exit goto end
if %TARGET%==autoreduce goto auto
:: /v value
:: /t type (REG_DWORD in this case)
:: /d data to assign to the value
:: /f force overwriting the current value w/ no prompt
reg add "\\%TARGET%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v DiskPercent /t REG_DWORD /d 00000002 /f
reg add "\\%TARGET%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\Cfg" /v DiskPercent /t REG_DWORD /d 00000002 /f
echo.
goto loop
:: HIROSHIMA!
:auto
title Mass SysRestore Reducing...
cls
echo.
echo Performing mass System Restore usage reduction.
echo Please wait...
echo.
:: We use a FOR loop to iterate through the list of system names.
:: %%i is the current computer name read from the file
FOR /F %%i in (%NAMES_FILE%) do echo %%i && reg add "\\%%i\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v DiskPercent /t REG_DWORD /d 00000002 /f
FOR /F %%i in (%NAMES_FILE%) do echo %%i && reg add "\\%%i\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\Cfg" /v DiskPercent /t REG_DWORD /d 00000002 /f
title Mass SysRestore Reduce -- Complete
echo.
echo Mass SysRestore Reduce -- Complete
echo.
title %USERNAME%