Click here to Skip to main content
Click here to Skip to main content

Tagged as

Programmatically Create System Restore Point

, 6 Nov 2010
Rate this:
Please Sign up or sign in to vote.
System Restore is a powerful feature used in windows operating systems to create backups of the current system state before installation of custom software and critical system changes so that in case of an error, the user will be able to go back to the point just before the system was...
System Restore is a powerful feature used in windows operating systems to create backups of the current system state before installation of custom software and critical system changes so that in case of an error, the user will be able to go back to the point just before the system was changed.
 
Suppose you are developing a custom application and at a point in time your application needs to change some system settings. It would be a great idea if you can create a restore point from within your application without the need to notify the user to manually create a restore point.
 
To create a restore point from vb.net code, we will use the handy GetObject method to grab the system restore application and create an instance from it. Once we have a system restore variable in hand, we just need a call to CreateRestorePoint method passing in the name of the restore point. There are 2 more variables that you do not need to worry about, These are the RestorePointType and the EventType which have static values in most cases of 0 and 100 respectively. Note that the CreateRestorePoint method takes a few seconds to execute. Below is a simple implementation to create a test restore point:
 
the code is posted here http://alitarhini.wordpress.com/2010/10/31/programmatically-create-system-restore-point/[^]

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ali Tarhini
Software Developer (Senior) Microgen
Lebanon Lebanon
For more articles and extreme topics please check out my personal website www.alitarhini.com

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 6 Nov 2010
Article Copyright 2009 by Ali Tarhini
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid