System Restore Point is a very useful feature of Windows Operation System. This is basically used when we got some issue with OS because of any new installation. By the help of this feature we can easily restored our OS with any previous date when this point was created (but we will lost all data which we save or installed after restored point date so be careful about it).
So it will be good to add a feature to create a System Restored Point with our such type of installation process where we update some critical system settings with Installation.
To create a system restore point using VB.net is very easy task. You need to worry only about Get Object method only.
Private Sub CreateSystemRestorePoint() Dim SysterRestoredPoint = GetObject("winmgmts:\\.\root\default:Systemrestore") If SysterRestoredPoint IsNot Nothing Then 'Replace 'My System Restored Point' with your ststem restored point If SysterRestoredPoint.CreateRestorePoint("My System Restored Point", 0, 100) = 0 Then MsgBox("System Restored Point Created") Else MsgBox("System Restored Point Could not Created!") End If End If End Sub
If you got message “System Restored Point Created” then you can verify your system restore point in Open System Restore by clicking the Start button . In the search box, type System Restore, and then, in the list of results, click System Restore. If you’re prompted for an administrator password or confirmation, type the password or provide confirmation.