# Keep files only WindowsReset.exe --keep-files WindowsReset.exe --clean-all Using PowerShell .\LocalWindowsReinstall.ps1 -KeepFiles -KeepApps
// 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();
public class ResetConfiguration
UI Mode: Run the WPF application and select options
private async Task<bool> CheckPrerequisites() local reinstall windows
private async Task CopyDirectoryAsync(string source, string destination)
public async Task ExecuteReinstall(ResetOptions options) # Keep files only WindowsReset
return $true