Page 1 of 1

Create Windows 8 restore point programmatically

Posted: 16 Jul 2015 01:52
by jwoegerbauer
Does anyone have any DOS code for creating a system restore point in Windows 8? I have done a Google-search for this but no luck.

Re: Create Windows 8 restore point programmatically

Posted: 16 Jul 2015 03:29
by foxidrive
Must be run as admin:

Code: Select all

wmic /namespace:\\root\default path SystemRestore call createrestorepoint "wmic auto backup", 100, 12

Re: Create Windows 8 restore point programmatically

Posted: 16 Jul 2015 10:23
by Squashman
jwoegerbauer wrote:Does anyone have any DOS code for creating a system restore point in Windows 8? I have done a Google-search for this but no luck.

Well if you were Google searching for "DOS code" it will never find it.

Re: Create Windows 8 restore point programmatically

Posted: 18 Jul 2015 02:43
by jwoegerbauer
Squashman wrote:Well if you were Google searching for "DOS code" it will never find it.

For how stupid do you hold me? BTW: I've tested it. Searching Google for "DOS code" delivers 318,000,000 results.

Re: Create Windows 8 restore point programmatically

Posted: 18 Jul 2015 02:54
by jwoegerbauer
foxidrive wrote:Must be run as admin:

Code: Select all

wmic /namespace:\\root\default path SystemRestore call createrestorepoint "wmic auto backup", 100, 12

Thanks a lot. Worked like a charm.

Image

Re: Create Windows 8 restore point programmatically

Posted: 18 Jul 2015 08:49
by foxidrive
jwoegerbauer wrote:Searching Google for "DOS code"


Squashman was saying, quite accurately, that it is a poor search term when searching for a command line solution.

Re: Create Windows 8 restore point programmatically

Posted: 13 Dec 2015 06:46
by Meerkat
foxidrive wrote:Must be run as admin:

Code: Select all

wmic /namespace:\\root\default path SystemRestore call createrestorepoint "wmic auto backup", 100, 12


Hello!
What does the 100,12 mean? Thanks! :D

UPDATE:

I finally got it. This link describes the numbers 100 (EventType) and 12(RestorePointType):
https://msdn.microsoft.com/en-us/library/windows/desktop/aa378847(v=vs.85).aspx

Meerkat

Re: Create Windows 8 restore point programmatically

Posted: 13 Dec 2015 08:29
by foxidrive
Mr Google doesn't want to tell me either.