Tip: Protecting Files During System Restore

In this column, I'd like to go into greater depth on System Restore and give you some cautions on what to expect when you use it. Joli Ballew has written an excellent column on System Restore, and I don't want to replicate that, but instead, talk about some of the details that aren't immediately obvious when you're working with System Restore.

Protect Important Files

Before you use System Restore, you should make sure that any critical files aren't residing on your desktop. While the wizard for System Restore says it will not cause you to lose recent work, such as documents or email, it's important to understand exactly what will be preserved, and what won't, in a System Restore.

The general rule is that all files in your My Documents folder are preserved, but files in other places are not necessarily preserved. This can be a problem if, like me, you sometimes use your desktop for temporary storage of a file or files you're working on or just downloaded.

To understand which file types were preserved and which ones weren't, I did a little experiment. First, I created a System Restore point to come back to. Then, I looked in the registry to find all the file types that my copy of Windows XP Professional knew about and extracted that list a total of 317 file types, I might add. Next I created a script to make a new file of each file type on my desktop, using Windows Services for UNIX Korn shell. Now I created a second System Restore point, as shown in Figure 1.

Figure 1

This second restore point has all my test files included, and is otherwise exactly the same as the first restore point.

Now, time to test the restore I did a System Restore to the original restore point, as shown in Figure 2.

Figure 2

If a file type is preserved on your desktop during a System Restore, it should still be present on the desktop. The ones that aren't preserved will have been deleted since they weren't there when I created that first restore point.

So, a quick check of the number of files on my desktop yields a rather startling result of the original 317 files I created, there are only 257 files left! This means that 60 files were deleted by the System Restore process.

Which files types were deleted? A complete list is shown in Table 1, but there is one thing that many of them seem to have in common they are, in one way or another, executable or system files. Everything from .EXE files to .FON files are in the list. File types that did not get deleted by the System Restore process include all the common document file types used by Microsoft Office.

What System Restore is doing is trying to protect us from ourselves. An executable file on the desktop could easily be something that shouldn't be there at all, and be the source of our problem that requires a system restore. So the fact that the files that aren't protected during a restore are all system or executable files is the right behaviour, but one that we, as users, need to be aware of.

This second restore point has all my test files included, and is otherwise exactly the same as the first restore point.

Now, time to test the restore I did a System Restore to the original restore point, as shown in Figure 2.

Figure 2

If a file type is preserved on your desktop during a System Restore, it should still be present on the desktop. The ones that aren't preserved will have been deleted since they weren't there when I created that first restore point.

So, a quick check of the number of files on my desktop yields a rather startling result of the original 317 files I created, there are only 257 files left! This means that 60 files were deleted by the System Restore process.

Which files types were deleted? A complete list is shown in Table 1, but there is one thing that many of them seem to have in common they are, in one way or another, executable or system files. Everything from .EXE files to .FON files are in the list. File types that did not get deleted by the System Restore process include all the common document file types used by Microsoft Office.

What System Restore is doing is trying to protect us from ourselves. An executable file on the desktop could easily be something that shouldn't be there at all, and be the source of our problem that requires a system restore. So the fact that the files that aren't protected during a restore are all system or executable files is the right behaviour, but one that we, as users, need to be aware of.

File TypeFile TypeFile TypeFile Type

.386

.acf

.acs

.bat

.cat

.cmd

.com

.cpl

.crl

.DeskLink

.dll

.dos

.drv

.dsn

.dun

.exe

.fnt

.fon

.hhc

.hlp

.hta

.htc

.icm

.ico

.inf

.ini

.ins

.inv

.lnk

.manifest

.MAPIMail

.mmm

.msc

.msi

.mydocs

.nfo

.ocx

.pbk

.pfm

.pif

.pnf

.rat

.reg

.rsp

.sam

.scr

.sdb

.spc

.sst

.sym

.sys

.tlb

.tsp

.ttf

.UDL

.vbs

.vbx

.vxd

.wmz

.ZFSendToTarget

Table 1 Partial List of File Types Deleted During System Restore

Clearly the Desktop is not a good place to store files, especially executable ones, if you're going to be doing a System Restore. But what about other locations?

Tip: Undoing System Restore

If you make a mistake, and do a system restore that deletes a file you really, really wanted, you can recover by undoing the System Restore. When I reversed the System Restore above, all of the missing files were restored.

Top of pageTop of page

Use My Documents to Preserve Files

As you can see from the list of files in Table 1 that got deleted, none of the standard Office document files are in the list. That's good. But what happens when we look at the files that are in the My Documents folder? After all, thats where one is supposed to put documents, and System Restore should certainly save them there. To test this, I repeated my test, but this time did it in the My Documents folder, creating another 317 different file types in that folder, as shown in Figure 3.

Figure 3

Then I performed a System Restore, reverting to the exact same restore point as I did above. A quick check of the number of file types in the directory yields 317 test files none of my test files was deleted during the System Restore, regardless of what type of file it was. Good, I like that!

Note: To complete the testing, I created a folder under My Documents, created the 317 test files in it, and tried again. As in the parent My Documents folder, all the files were preserved during a system restore.

Top of pageTop of page

Scripts Used

During the testing for this column, I used several scripts, and a file that I created that listed the 317 file type extensions known to a bare bones Windows XP Professional system. The scripts were simple Korn shell scripts, run in Windows Services for UNIX v3.5, available as a free download at the link shown below. The scripts used are listed here:

    	#!/bin/ksh
    	# Script to create a a bunch of files of different types
    	# Uses a flat file with a list of file extensions
    	_Filetypes=/dev/fs/C/temp/FileTypes.txt

	while read _ext; do      # listed extensions include the dot
   	touch test$_ext          # touch will create a file if it doesn't exist
	done < $_Filetypes    # read from file
    	
    	#!/bin/ksh
	# check which file types are deleted on the desktop
	# during a system restore
	#
	_Original=/dev/fs/C/temp/FileTypes.txt
	_Deleted=/dev/fs/C/temp/deleted.txt
	
	print "Deleted file types during a System Restore" > $_Deleted

	# Loop to read a list of extensions, and see if the file exists
	while read _ext ;                 # Read list of extensions
	do
   		if [[ ! -a test$_ext ]];       # If file doesn't exist
   		then
   	   	print $_ext >> $_Deleted    # Add to list of deleted extensions
   		fi
	done < $_Original                 # Read from original list of types