How to create a script file to delete all restore points in Windows 7 / 8.1?

Discussion in 'Scripting' started by clavafede, Mar 21, 2015.

  1. clavafede

    clavafede MDL Novice

    Jul 12, 2011
    9
    0
    0
    As the title, I'm looking for a script or batch file to delete all restore points system.
    Thanks to those who will help me.
     
  2. leebo_28

    leebo_28 MDL Senior Member

    Jun 12, 2011
    464
    174
    10
    #2 leebo_28, Mar 21, 2015
    Last edited by a moderator: Apr 20, 2017
    for specific volume change "C:" to whatever
    Code:
    vssadmin delete shadows /for=C: /all
    for all volumes
    Code:
    vssadmin delete shadows /all
     
  3. clavafede

    clavafede MDL Novice

    Jul 12, 2011
    9
    0
    0
    Thanks for the reply Leebo 28
    I tried your command but it only works on 32-bit systems .
    Why ...
     
  4. leebo_28

    leebo_28 MDL Senior Member

    Jun 12, 2011
    464
    174
    10
    works on my x64 win7 Pro..
     
  5. oldsh_t

    oldsh_t MDL Expert

    Dec 23, 2009
    1,082
    532
    60
    Can you not just shut down System Restore and it will delete everything itself?
     
  6. clavafede

    clavafede MDL Novice

    Jul 12, 2011
    9
    0
    0
    Hello Leebo 98 , my error is : You do not have permission to run the command .Run the utility from a command window that has administrative privileges high .Everything works instead on 32 Bit .Thanks for the time you're devoting .
     
  7. leebo_28

    leebo_28 MDL Senior Member

    Jun 12, 2011
    464
    174
    10
    right click on cmd or the batch file and choose "run as administrator"
     
  8. Palladin

    Palladin MDL Senior Member

    Feb 1, 2014
    477
    248
    10
    #8 Palladin, Apr 12, 2015
    Last edited: Apr 12, 2015
    Yep, that's what I've done.
    Control Panel / System / System Protection / Configure and then turn it off.
    Someone else will have to come up with a script to automate this.
    After you shut it off, here's all that's left.
    I'd rather make a weekly Acronis image than rely on System Restore.

    . system-restore-file-listing.jpg
     
  9. oldsh_t

    oldsh_t MDL Expert

    Dec 23, 2009
    1,082
    532
    60
    That was just my point. If you don't want it just shut it down and it will flush everything out.
    If you still want to use System restore but want to flush out all old restore points > shut it down > reboot > start it back up.
    It's not hard or time consuming. And yes I would also rater use Acronis image. I have never had any luck with System restore.