[Updating] Some things About System Restore

Discussion in 'Windows 8' started by Mouri_Naruto, Jul 10, 2014.

  1. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Jul 10, 2014
    525
    1,791
    30
    #1 Mouri_Naruto, Jul 10, 2014
    Last edited by a moderator: Apr 20, 2017
    PS:This Thread has been posted in PCBeta by myself on the 5th of May,2014.

    PS:Why I say "some things" because Microsoft know more than I about this. I also know I am not a god.

    PS:I want to post this thread in MDL because I want more people to know the System Restore.

    First:The introduction about System Restore

    System Restore is a feature in Microsoft Windows that allows the user to revert their computer's state (including system files, installed applications, Windows Registry, and system settings) to that of a previous point in time, which can be used to recover from system malfunctions or other problems. First included in Windows ME, it has since been included in all following desktop versions of Windows released since, excluding the Windows Server.
    In prior Windows versions it was based on a file filter that watched changes for a certain set of file extensions, and then copied files before they were overwritten. An updated version of System Restore introduced by Windows Vista uses the Shadow Copy service as a backend (allowing block-level changes in files located in any directory on the volume to be monitored and backed up regardless of their location) and allows System Restore to be used from the Windows Recovery Environment in case the Windows installation no longer boots at all.

    This is the introduction of the System Restore.Next I'd like to say how to make the system restore uses for us.

    First, how to enter the system restore graphical setting interface (for Windows 8.1)


    First right click "This PC" menu and click "properties",then click "System Protection" can enter the system restore graphical setting interface; the inside of the options for further use system restore people have enough; and the interface is very simple; but the point here is not this article, after all, if you write the words, how to meet the more in-depth study of this title; so the graphical settings will skip.

    Second:How to manage the System Restore with the Command Prompt

    Next I want to introduce into the part, that is the command line management system restore...... I believe that very few people know this part, I also the original intention of writing this article

    Introduced before, first open the administrator command prompt (Windows 8/8.1 WinKey+X menu command prompt (administrator); Win7 to the start menu to find)
    Open a command prompt, type VSSAdmin, appeared the following interface

    Code:
    vssadmin 1.1 - 卷影复制服务管理命令行工具
    (C) 版权所有 2001-2013 Microsoft Corp.
    
    
    错误:  无效命令。
    
    
    ---- 支持的命令 ----
    
    
    Delete Shadows        - 删除卷影副本
    List Providers        - 列出已注册的卷影副本提供程序
    List Shadows          - 列出现有卷影副本
    List ShadowStorage    - 列出卷影副本存储关联
    List Volumes          - 列出可以进行卷影副本处理的卷
    List Writers          - 列出订阅的卷影副本写入程序
    Resize ShadowStorage  - 重新调整卷影副本存储关联的大小
    See this tool, some people might feel familiar, some people think that question; why is the volume shadow copy? Because the system began in the Vista reduction and volume shadow copy merged, so you can use the volume shadow copy tool management; these commands detailed can use /? Viewing parameters, here are some commonly used commands:
    View the system restore and volume shadow copy on disk usage (and system protection tab configuration displayed inside the disk usage equivalence; even in more detail)


    Code:
    vssadmin.exe List ShadowStorage
    The results after the operation is as follows

    Code:
    vssadmin 1.1 - 卷影复制服务管理命令行工具
    (C) 版权所有 2001-2013 Microsoft Corp.
    
    
    卷影副本存储关联
       卷: (C:)\\?\Volume{90d3964c-535e-4e40-977c-2765087cf8c4}\
       卷影副本存储卷: (C:)\\?\Volume{90d3964c-535e-4e40-977c-2765087cf8c4}\
       已用卷影副本存储空间: 129 MB (0%)
       分配的卷影副本存储空间: 405 MB (0%)
       最大卷影副本存储空间: 2.38 GB (1%)
    
    
    卷影副本存储关联
       卷: (G:)\\?\Volume{cf8dcaa0-c1e3-11e3-824e-806e6f6e6963}\
       卷影副本存储卷: (G:)\\?\Volume{cf8dcaa0-c1e3-11e3-824e-806e6f6e6963}\
       已用卷影副本存储空间: 0 字节 (0%)
       分配的卷影副本存储空间: 0 字节 (0%)
    
       最大卷影副本存储空间: 19.7 GB (30%)
    If you feel too large system restore occupied space, can clean up operation as follows


    If you want to delete all the reduction points in a partition, you can use the following command

    Code:
    Vssadmin.exe Delete Shadows /For= you want to remove the drive letter (such as C:) /All /Quiet
    If all the reduction points you want to delete all partitions, you can use the following command


    Code:
    Vssadmin.exe Delete Shadows /All /Quiet
    If you want to keep and delete restore point recently in a partition, you can use the following command


    Code:
    Vssadmin.exe Delete Shadows /For= you want to remove the drive letter (such as C:) /Oldest /Quiet
    If you want to keep and delete restore point recently in all partitions, you can use the following command


    Code:
    Vssadmin.exe Delete Shadows /Oldest /Quiet
    The maximum size if you want to adjust the system restore point of partition, can have a look the following instructions


    Code:
    Resize ShadowStorage /For=ForVolumeSpec /On=OnVolumeSpec /MaxSize=MaxSizeSpec
    These commands to the system restore management is enough, I have also studied how to use API to manage system restore; but because of the volume shadow copy API is too complicated; for some people (including me) is a thankless; if have a volume shadow copy API God, please help me to write an article my regret

    Three:How to manage System Restore with Programming Language

    1.Use WMI with mshta

    (1)Create a Restore Point

    Code:
    mshta.exe vbscript:getobject("winmgmts:\\.\root\default:Systemrestore").createrestorepoint("New Snapshot",0,100)(window.close)


    (2)Enable System Restore

    Code:
    mshta.exe vbscript:getobject("winmgmts:\\.\root\default:Systemrestore").Enable(enter the partition you want to enable system restore, such as C:; if you want to enable all the partition, please enter "" instead)(window.close)


    (3)Disable System Restore

    Code:
    mshta.exe vbscript:getobject("winmgmts:\\.\root\default:Systemrestore").Disable(enter the partition you want to disable system restore, such as C:; if you want to disable all the partition, please enter "" instead)(window.close)


    2.Use WMI with VBScript

    (1)Create a Restore Point

    Code:
    getobject("winmgmts:\\.\root\default:Systemrestore").createrestorepoint("New Snapshot",0,100)


    (2)Enable System Restore

    Code:
    getobject("winmgmts:\\.\root\default:Systemrestore").Enable(enter the partition you want to enable system restore, such as C:; if you want to enable all the partition, please enter "" instead)


    (3)Disable System Restore

    Code:
    getobject("winmgmts:\\.\root\default:Systemrestore").Disable(enter the partition you want to disable system restore, such as C:; if you want to disable all the partition, please enter "" instead)
    (the following to be continued,there are a lot of information to prepare)
     
  2. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Jul 10, 2014
    525
    1,791
    30
    For future use
     
  3. FaiKee

    FaiKee Misinformation spreader

    Jul 24, 2009
    4,303
    5,816
    150
    Hi, Naruto, nice to see you here. :D
     
  4. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Jul 10, 2014
    525
    1,791
    30
    Hi,FaiKee.Nice to meet you to.This is the first time to join the MDL.
     
  5. Jazz

    Jazz MDL Senior Member

    Jun 7, 2014
    341
    89
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Jul 10, 2014
    525
    1,791
    30
    Yes,like this.
     
  7. bchat

    bchat MDL Smart Azz

    Nov 7, 2008
    1,722
    453
    60
    OR:

    Install Acronis True Image, make a bootable USB, turn system restore off and sleep soundly at night, or day, or time of your choice.
    JMO
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Jul 10, 2014
    525
    1,791
    30
    I think System Restore is useful to solve most problems.I often use DISM to backup the System