Today I was working on a PC that kept failing backups. Once I started the backup I was intrigued at how long it estimated to complete. Upon further investigation I could see that the disk space used was over 45 Gigabytes. This is extremely high for this PC.
Using
TreeSize Free it reported only 13 Gigabytes being used. TreeSize Free cannot access the hidden
System Volume Information folder. It then occurred to me that the System Restore might be the culprit.
As it turns out on Windows XP, the default for System Restore is to use up to 12% of the total disk space. This is huge when you consider the size of hard drives today. Obviously I wanted to reduce this size not only on this machine but for many others that we are responsible for.
Using one of our favorite tools called
VNCscan we were able to create some scripts to help roll-out the changes to several computers at once.
By reducing all of the computers to use just 1% of their total hard drive space will save us a ton of space on our backup volumes. On the troubled PC that started all of this, we went from using over 45 Gigabytes of space to just 13 Gigabytes.
In VNC Scan we broke this up into three scripts.
Script 1 - System Restore Cap to 1 percent (a CMD script)
%SYSTEMDRIVE%
cd \temp\vncscan
:: The following sets the maximum percentage of disk space used by System Restore
REG ADD "HKLM\Software\Microsoft\Windows NT\Currentversion\SystemRestore" /v DiskPercent /t REG_DWORD /d 1 /f
REG ADD "HKLM\Software\Microsoft\Windows NT\Currentversion\SystemRestore\Cfg" /v DiskPercent /t REG_DWORD /d 1 /f
ECHO Now you must stop and restart System Restore
PAUSE
Script 2 - System Restore OFF (a VBS script)
strComputer = "."
set objWmi = GetObject("winmgmts://" & strComputer & _
"/root/default:SystemRestore")
objWmi.Disable("")
WScript.Echo "System Restore disabled"
Script 3 - System Restore ON (a VBS script)
strComputer = "."
set objWmi = GetObject("winmgmts://" & strComputer & _
"/root/default:SystemRestore")
objWmi.Enable("")
WScript.Echo "System Restore enabled"
Hoping this will help someone else in the future.