How to Create System Restore Point from VB.net

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.

windows restore point-1

Figure 1

windows restore point-2

Figure 2

Author: Ankur

Have worked primarily in the domain of Calling, CRM and direct advertisers services. My technological forte is Microsoft Technologies especially Dot Net (Visual Studio 2003, 2005, 2008, 2010 and 2012) and Microsoft SQL Server 2000,2005 and 2008 R2. My Area of Expertise is in C#. Net, VB.Net, MS-SQL Server, ASP. Net, Silverlight, HTML, XML, Crystal Report, Active Reports, Infragistics, Component Art, ComponeOne, Lead Tools etc.