RestoreHelper
Restore counterpart to BackupHelper. Pulls latest backup from USB stick onto C:. SIDs differ post-reinstall so ACLs are reset per profile (icacls /reset + grant user/Admins/SYSTEM). NTUSER.DAT and AppData\Local skipped — would corrupt fresh registry/cache state. Idempotent via "BackupRestored" log marker.
public static class RestoreHelper
1. Fields
1.1. MarkerLogName
public const string MarkerLogName
2. Methods
2.1. RestoreIfPresent(ISystemHost, AbsolutePath)
Restore latest backup from {usbRoot}\NETSetup\Backup\ onto C:\. Returns false if no backup found or already restored.
public static bool RestoreIfPresent(ISystemHost host, AbsolutePath usbRoot)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
|
usbRoot |
AbsolutePath |
Returns: bool