restore-points

How to create a system restore point programmatically?

柔情痞子 提交于 2019-11-27 18:32:31
问题 I'm looking for a way to create a system restore point with the current date and time by pressing a button. I've tried searching the web for a simple way to do this but I haven't found one yet. I found this code snippet from: http://msdn.microsoft.com/en-us/library/windows/desktop/aa378847%28v=vs.85%29.aspx but it is in VB and not C#, I tried converting it a bit but I don't think i'm doing a great job of translating it. 'CreateRestorePoint Method of the SystemRestore Class 'Creates a restore