# Execute reset Write-Host "Initiating Windows reset..." -ForegroundColor Yellow
// Use Windows.System.UserProfile.UserProfilePersonalizationSettings // or invoke system reset using Process.Start with systemreset.exe string resetArgs = options.KeepPersonalFiles ? "-keepmyfiles" : "-cleanpc"; using (Process process = new Process()) process.StartInfo.FileName = "systemreset.exe"; process.StartInfo.Arguments = resetArgs; process.StartInfo.UseShellExecute = true; process.StartInfo.Verb = "runas"; // Run as administrator process.Start(); await process.WaitForExitAsync(); local reinstall windows
private async Task CopyDirectoryAsync(string source, string destination) # Execute reset Write-Host "Initiating Windows reset
public async Task BackupUserSettings(ResetOptions options) process.StartInfo.Arguments = resetArgs