See List of All Available System Restore Points in Windows  

Page 2 of 2 FirstFirst 12

  1. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #10

    Hello @Brink,

    I have put this CMD Batch Script together to extract the information which could possibly be an added option in the Tutorial:

    Code:
    
    @echo off
    fsutil Dirty Query %SystemDrive% > nul && goto:[RunAs]
    echo CreateObject^("Shell.Application"^). ^
    ShellExecute "%~0","+","","RunAs",1 > "%Temp%\+.vbs" && "%Temp%\+.vbs" & Exit
    :[RunAs]
    
    echo.
    PowerShell ^
         $Arr_EventType=@{100='BEGIN_SYSTEM_CHANGE'; 101='END_SYSTEM_CHANGE'; 102='BEGIN_NESTED_SYSTEM_CHANGE'; 103='END_NESTED_SYSTEM_CHANGE'}; ^
         $Arr_RestorePointType=@{0='APPLICATION_INSTALL'; 1='APPLICATION_UNINSTALL'; 10='DEVICE_DRIVER_INSTALL'; 12='MODIFY_SETTINGS'; 13='CANCELLED_OPERATION'; 16='OTHER'}; ^
         $Tot=((Get-ComputerRestorePoint) ^| Measure-Object).Count; ^
         $List=(Get-ComputerRestorePoint  ^| Sort-Object -Property CreationTime -Descending ^| Format-Table -AutoSize ^
         @{L='Creation Time'     ;E={;if([string]::IsNullOrWhiteSpace($_.CreationTime))     {'-'} else {$_.ConvertToDateTime($_.CreationTime).ToString()}}}, ^
         @{L='Description'       ;E={;if([string]::IsNullOrWhiteSpace($_.Description))      {'-'} else {$_.Description}}}, ^
         @{L='Sequence Number'   ;E={;if([string]::IsNullOrWhiteSpace($_.SequenceNumber))   {'-'} else {$_.SequenceNumber}};A='Left'}, ^
         @{L='Event Type'        ;E={;if([string]::IsNullOrWhiteSpace($_.EventType))        {'-'} else {$Arr_EventType[[int]$_.EventType]}}}, ^
         @{L='Restore Point Type';E={;if([string]::IsNullOrWhiteSpace($_.RestorePointType)) {'-'} else {$Arr_RestorePointType[[int]$_.RestorePointType]}}} ^| ^
    Out-String -Width 1000).Trim("""`r`n"""); ^
         if ($List.Length) {Write-Host """`n--- System Restore Point(s) [$Tot] - Sorted by [CreationTime -Descending] ---`n`n `n`n$List"""} else ^
                           {Write-Host """`n--- NO System Restore Point(s) Available ---"""; exit 1} >> %Temp%\A.txt
         for /f "delims=" %%i in (%Temp%\A.txt) do echo. %%i
         del %Temp%\A.txt
    
    echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & Exit
    
    
    

    NOTE:- If the %Temp% folder path contains spaces and special characters etc, then enclose the path in quotes.

    @thename,

    This might also help with your data query !
    Last edited by Paul Black; 26 May 2023 at 16:21.
      My Computer


  2. Posts : 295
    Windows 10 Pro
       #11

    System Restore Explorer is a nice tool, too. You'll need to install .Net 3.5 via the add/remove Windows features in 10. https://www.nicbedford.uk/software/s...storeexplorer/
      My Computer


  3. Posts : 7,606
    Windows 10 Home 20H2
       #12

    Paul Black said:
    Code:
     %Temp%\A.txt
    Note that the folder path of %Temp% could contain spaces and special characters, which might cause a problem.
      My Computer


  4. Posts : 316
    Pro 20H2
       #13

    Paul Black said:
    Amended.
    Does the amendment consist of quotes around the first and third instances of %Temp%\A.txt ?
    IF so, then are not quotes needed likewise in the second instance?
      My Computer


  5. Posts : 316
    Pro 20H2
       #14

    Although Get-ComputerRestorePoint run manually in PS command line is successful,
    in the script it gets error.
    Get-ComputerRestorePoint : Access denied
      My Computer


  6. Posts : 316
    Pro 20H2
       #15

    thename said:
    are not quotes needed likewise in the second instance?
    Turns out that quotes there makes it be a string unless single quotes also are added ('"%Temp%\A.txt"')
      My Computer


  7. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #16

    I have put my post back to the original Script and added a Note in case the %Temp% folder path contains spaces and/or special characters etc, which would apply to a negligible percentage of people.
      My Computer


  8. Posts : 316
    Pro 20H2
       #17

    Paul Black said:
    I have put my post back to the original Script and added a Note in case the %Temp% folder path contains spaces and/or special characters etc, which would apply to a negligible percentage of people.
    Yeah, that is good. (Those to whom it is applicable can work the FOR command as I did.)
      My Computer


  9. Posts : 7,606
    Windows 10 Home 20H2
       #18

    Paul Black said:
    a negligible percentage of people.
    Some people might use spaces and an ampersand in a username such as "Mr. & Mrs. Smith".
    A Chinese user might even use Chinese characters.
      My Computer


 

Tutorial Categories

See List of All Available System Restore Points in Windows Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:43.
Find Us




Windows 10 Forums