How to Reduce Disk Space used for System Restore Points

I got a funny little task the other day where a I had to reduce the disk space that some Windows XP clients were using for System Restore Points. This was due to a very old application that couldn’t see above a 8 GB limit and hence thought that the machine was out of disk space while it actually had plenty of free space left.

Newer versions of Windows have a nice commandline utility (vssadmin) that quite easily can handle this issue when you’re an administrator managing a hole bunch of machines and don’t want to run around to each of them and click in a GUI. To my big surprise it was not that easy with Windows XP because while you can completely disable System Restore Points by group policy or registry tweak it’s not that easy to just reduce it’s space usage. We didn’t want to completely disable System Restore Points as they can actually be very useful in some situations (saved one of my clients at least once) so we found these handy registry keys that you can set to reduce the size:

 reg add “\\%1\HKLM\Software\Microsoft\Windows NT\Currentversion\SystemRestore” /v DiskPercent /t REG_DWORD /d 1 /f
 reg add “\\%1\HKLM\Software\Microsoft\Windows NT\Currentversion\SystemRestore\Cfg” /v DiskPercent /t REG_DWORD /d 1 /f

%1 = computername

This should reduce the size to a maximum of 1% total disk space. But guess what – after some days, several reboots and automated “disk cleanup” that runs every day (although excluding System Restore Point deletions) nothing happened and disk space usage remained unchanged. It turns out that the registry keys are ignored unless you go through the GUI manually and apply a change. After several hours of Goggleing I found a solution that disables and the reenables System Restore Points. After which it will apply the new registry key settings. You can run these commands remote from a batch file using Sysinternals PsExec utility:

 psexec -i \\%1 wmic /namespace:\\root\default path SystemRestore call Disable %SystemDrive%\
 psexec -i \\%1 wmic /namespace:\\root\default path SystemRestore call Enable %SystemDrive%\

%1 = computername

This entry was posted in Ikke kategoriseret. Bookmark the permalink.

2 Responses to How to Reduce Disk Space used for System Restore Points

  1. David Cocke says:

    I just wanted to say thank you, Steen, for documenting this. Saved me lots of time.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s