0

I am trying to create a restore point on Windows using the C API function SRSetRestorePoint using the official example from here:

https://learn.microsoft.com/en-us/windows/win32/sr/using-system-restore#example-1-create-a-restore-point

It compiles fine and also runs until calling SRSetRestorePoint which in my case returns false.

SMgrStatus.nStatus than has a value of 5 which is not documented as a status. I am checking for each of the status codes from here:

https://learn.microsoft.com/en-us/windows/win32/api/srrestoreptapi/ns-srrestoreptapi-statemgrstatus#remarks

I am on Windows 10 having everything up-to-date. Every service that should be enabled for creating restore points is enabled and other programs like shut up 10 are able to create restore points. Also on a friend's PC the same thing happens with the little program I (or the Microsoft guys) wrote.

It is also not possible for me to create a restore point using wmic. (See https://www.winhelponline.com/blog/create-system-restore-point-script-windows-10-8-7-vista-xp/)

At least rstrui.exe does not show any new restore points.

Has anyone also encountered that issue or has a solution for this?

Thanks in advance and let me know if you need further information of my system.

1 Answers1

0

To create a restore point, you must have administrator rights.

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – YesThatIsMyName Jan 17 '23 at 08:45