Create Windows 8 restore point programmatically

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jwoegerbauer
Posts: 33
Joined: 01 Jan 2013 12:09

Create Windows 8 restore point programmatically

#1 Post by jwoegerbauer » 16 Jul 2015 01:52

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.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Create Windows 8 restore point programmatically

#2 Post by foxidrive » 16 Jul 2015 03:29

Must be run as admin:

Code: Select all

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

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Create Windows 8 restore point programmatically

#3 Post by Squashman » 16 Jul 2015 10:23

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.

jwoegerbauer
Posts: 33
Joined: 01 Jan 2013 12:09

Re: Create Windows 8 restore point programmatically

#4 Post by jwoegerbauer » 18 Jul 2015 02:43

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.

jwoegerbauer
Posts: 33
Joined: 01 Jan 2013 12:09

Re: Create Windows 8 restore point programmatically

#5 Post by jwoegerbauer » 18 Jul 2015 02:54

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

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Create Windows 8 restore point programmatically

#6 Post by foxidrive » 18 Jul 2015 08:49

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.

Meerkat
Posts: 89
Joined: 19 Jul 2015 02:27
Location: Philippines

Re: Create Windows 8 restore point programmatically

#7 Post by Meerkat » 13 Dec 2015 06:46

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
Last edited by Meerkat on 13 Dec 2015 08:32, edited 1 time in total.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Create Windows 8 restore point programmatically

#8 Post by foxidrive » 13 Dec 2015 08:29

Mr Google doesn't want to tell me either.

Post Reply