Open restore point code C#
im making a gui and wondering what the code is to open up your system properties to make a restore point manually
11 Replies
What code do you mean? and what has it to do with your program?
Do you mean
sysdm.cpl
?I have it able to make a restore point so if they want to revert anything they could
but i dont know how to make it open system properties
Run
sysdm.cpl
ok so
Process.Start("sysdm.cpl");
?
That didnt work
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1225251799771123732/image.png)
brought me here im trying to get it to bring me here
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1225251895837462568/image.png)
It's the same cpl, my guess is that the latter was opened with admin privileges
Almost all Windows operations are wrapped as PowerShell cmdlets, so for your case, use
Checkpoint-Computer
to write a .ps1 file, https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/checkpoint-computer?view=powershell-5.1 and then pass it to powershell.exe in Process.Start
.Checkpoint-Computer (Microsoft.PowerShell.Management) - PowerShell
The Checkpoint-Computer cmdlet creates a system restore point on the local computer. System restore points and the Checkpoint-Computer cmdlet are supported only on client operating systems, such as Windows 8, Windows 7, Windows Vista, and Windows XP. Beginning in Windows 8, Checkpoint-Computer cannot create more than one checkpoint each day.
pretty sure there are APIs for that