Users will often want to delete files from their computer to save space or improve performance. However, deleting files and registry entries can be risky. Deleting important system files or registry entries causes problems with the operating system or installed programs. Often users accidentally delete a file only to find out later that the file was vital to their computer's normal operating condition, leading to long support hours and high cost repairs.
Thus, users need a way to safely delete files from their computer and restore their computer's operation if a critical file is accidentally deleted.
The disclosed invention is a method and system of safely deleting files and registry entries. The invention works by intercepting commands for file deletion. Instead of deleting the file, the file is listed in a database as a deleted file and is hidden from the user and other applications on the computer. Other applications cannot access the deleted file. If something goes wrong with a program or the operating system, access to the file can be restored, returning the computer to full operating condition.
File interception occurs using a file system filter (FS Filter) that monitors calls from the user. The FS Filter intercepts the command and overrides the delete command.
As used herein, a file system filter (FS Filter) is either an application or API that overlays the file system and intercepts messages sent to the file system, typically from a user. Typically, an FS Filter is a driver used solely to intercept messages and is accessed when a separate application utilizes the API functions. However, the FS Filter and application could be a single piece of software running on the machine. Anytime, this invention refers to the FS Filter, it is understood that FS Filter could refer to a separate application with an accompanying FS Filter driver, one or more applications running on the machine utilizing the FS Filter driver of an operating system, or a single application the has an file system filter driver built in. The FS Filter can also apply to the registry and intercept messages sent to modify, add, or delete registry keys. This allows the invention to both protect the core files on the computer along with the information stored by the registry.
In step 101 of
The file 6 is made inaccessible by listing the file 6 in a blocked file list 14. In Step 103, when a separate program 14 (including the operating system) or when the user 8 tries to access the file 6, the FS Filter 2 intercepts the access command and checks to see if the file is part of the blocked file list 14. If the file 7 is found on the blocked file list 14, then the FS Filter 2 blocks access to the file 6, making the file appear to be completely removed. To ensure that the user is not confused about whether a file is deleted or not, on start up of the machine 12, the operating system or other software running on the machine reads the contents of the blocked file list 14 into memory and hides each file listed on the blocked file list 14 from the user 8.
The FS Filter 2 blocks access to files in the blocked file list 14 by monitoring each request made for a file. If the requested file is found in the blocked file list 14, the FS Filter 2 returns a message that the file has been deleted or is missing. If the file is not found in the blocked file list 14, the FS Filter 2 allows the request to proceed and the file is processed in the typical manner. The FS Filter can keep the blocked file list in memory or can check the blocked file list using standard database lookup routines each time a file is accessed.
If problems occurs after the file 6 is deleted, the deleted file 6 can be restored to its original state. The deleted file 6 can be restored manually by the user 8 by asking the user to select files in the blocked file list 14 to restore.
Alternatively, as shown in
Alternatively, if the machine 12 fails to start or if a critical event is logged on the machine, then the FS Filter 2 can determine which file in the file blocked list 14 was the last file accessed or that resulted in an error. The FS Filter 2 then restores the file that was last accessed to full functionality by removing the deleted file from the blocked file list 14, allowing the file 6 to be accessed by the user 8. The user 8 is warned that the deleted file 6 was restored to the machine 12 because of an error in the machine's operation. The user 8 can then take the appropriate actions to resolve the problem.
What constitutes a critical error can vary between separate embodiments of the invention. For example, a critical operating system error might cause the machine to reboot, whereas a critical error in software might prevent the software from operating as requested by a user. The FS Filter can include a definition of what constitutes a critical error for each application or can have a general definition such as an application failing to start properly. Critical errors can also be limited to only those errors causing the machine to not operate in its intended manner. The critical error definition can be set by the user using the FS Filter, by the FS Filter developer, or defined upon installation of the FS Filter using a wizard to configure the FS Filter's functions based on user preference.
Alternatively, instead of only restoring the blocked file that was last accessed, the FS Filter 2 can restore any combination of (i) all files accessed from a certain time before when the critical error occurred, (ii) all files that were added to the blocked file list 14 since the last successful start of the application creating the error, (iii) all files that were added to the blocked file list 14 since a certain time or date, (iv) all files that were added to the blocked file list 14 since the machine 12 was restarted, and (v) all files in the blocked file list 14. Restoring multiple files simultaneously, instead of restarting the application after each unsuccessful attempt to run the application, lowers the number of critical errors occurring on the machine. In each case, the FS Filter 2 alerts the user 8 or security software 10 protecting the machine 12 about which files were restored to correct the critical error. If security software 10 is alerted about restored files, the security software 10 can run the restored files in a limited capacity to ensure they do not include malware.
To increase space, the deletion process can be finalized, removing the files from the blocked file list. Final deletion occurs after the FS Filter 2 receives a request from a user 8 that the files be permanently deleted. Alternatively, the final deletion occurs after a certain amount of time passes without a critical error being generated. For example, if the machine reboots and the operating system restarts successfully then the file 6 would be actually deleted from the machine's hard drive.
A separate embodiment is shown in
In an alternate embodiment, depicted in a
In an alternate embodiment, shown in
For registry protection, the registry monitor (which is the same as the FS Filter but acts on the registry) logs deletions and modifications made to registry. The registry monitor also monitors calls to registry keys that have been deleted or modified. If an application fails to start after calling a changed registry key or if the machine stops functioning or cannot boot during a restart, the registry monitor restores the deleted or modigied registry entry. Registry restoration functions the same way as other file restoration and can be done atomically by the registry monitor or manually by the user.
In step 901 of
The invention is not restricted to the details of the foregoing embodiments. The invention extend to any novel one, or any novel combination, of the features disclosed in this specification (including any accompanying claims, abstract and drawings), or to any novel one, or any novel combination, of the steps of any method or process so disclosed.
This application claims the benefit of provisional application Ser. No. 61/155,194, filed Feb. 25, 2009, which is incorporated entirely herein by reference.
Number | Date | Country | |
---|---|---|---|
61155194 | Feb 2009 | US |