Exclude files or folders from System Restore
In Windows Vista, 7, 8 and 8.1, My Documents
is included (update: in Windows 10, System Protection is turned off by default for C:). In theory, System Restore does not affect documents, but unfortunately Microsoft's definition of 'document' is only those files whose extension is not included in their list of Monitored File Name Extensions. This list includes things like JavaScript .js, ActionScript .as, C# .cs, .INF, .INI, .1ST, .HLP - in total 574, including many that are used by various applications to save users' work.
If the files you want System Restore to leave alone are in this list, there is no way to prevent it from deleting such files added since the chosen restore point. Adding them to the FilesNotToBackup key will stop them being backed up by common backup programs, which is probably not what you want; it has no effect on System Restore. Adding them to FilesNotToSnapshot will stop them reverting to an earlier version, but will not stop them being deleted if they did not exist at the chosen restore point. Worse, with FilesNotToSnapshot the deleted files will not be recoverable by Undo Restore or Shadow Explorer, since the automatic restore point created before restoring will not contain them. Even worse, with FilesNotToSnapshot, making a restore point and immediately returning to it will delete those files, again with no Undo Restore possibility (without FilesNotToSnapshot it makes no changes).
Using FilesNotToSnapshot is thus more dangerous than the original problem with monitored extensions: rather than being reverted on Restore, your files will be deleted, and you won't be able to undo the deletion with Undo Restore or Shadow Explorer. Here's a table showing the possible changes to a monitored file since the Restore Point was made, what the user would like to happen on Restore, what happens by default, and what happens if the file is in FilesNotToSnapshot:
I have tested all this on Windows 7, 8 and 8.1 Update; it would be interesting to hear if those suggesting these registry keys have actually tried using them with System Restore in all cases: adding, modifying, deleting, and leaving unchanged a file with a monitored extension.
Personally, I think Microsoft have got it wrong with this functionality, and should trim the list of extensions. The best solution for now is to have your work files on a disk where System Protection is not enabled (e.g. either disabling it on C:
, or storing your files on D:
). Failing that, providing you haven't added files to FilesNotToSnapshot, after performing System Restore you can resurrect reverted or deleted work with Shadow Explorer, either as individual files or as a whole directory tree like C:\workshop
.