Touching on what Morten said, you can use this API. As far as I can tell, WMI does not provide a method to delete a recovery point. SRRemoveRestorePoint can delete a restore point if you have a serial number. You can get this through WMI. Here is my code to remove the recovery point.
[DllImport("Srclient.dll")]
public static extern int SRRemoveRestorePoint(int index);
private void button1_Click(object sender, EventArgs e)
{
int SeqNum = 335;
int intReturn = SRRemoveRestorePoint(SeqNum);
}
335, , . , 1 . , , .
, Microsoft #, . System.Management . .
private void EnumRestorePoints()
{
System.Management.ManagementClass objClass = new System.Management.ManagementClass("\\\\.\\root\\default", "systemrestore", new System.Management.ObjectGetOptions());
System.Management.ManagementObjectCollection objCol = objClass.GetInstances();
StringBuilder Results = new StringBuilder();
foreach (System.Management.ManagementObject objItem in objCol)
{
Results.AppendLine((string)objItem["description"] + Convert.ToChar(9) + ((uint)objItem["sequencenumber"]).ToString());
}
MessageBox.Show(Results.ToString());
}
(, Vista), . Admin, , .