diff --git a/GeneralViewModel.cs b/GeneralViewModel.cs index af0adff..fab5b9f 100644 --- a/GeneralViewModel.cs +++ b/GeneralViewModel.cs @@ -223,13 +223,13 @@ public void RunRegFile(string path) { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "reg.exe"; - startInfo.Arguments = "IMPORT " + path; + startInfo.Arguments = "IMPORT \"" + path + "\""; Process.Start(startInfo); } internal async Task ResetFonts() { - RunRegFile("Window Metrics fix"); + RunRegFile("Window Metrics fix.reg"); await Task.Delay(100); } @@ -241,7 +241,7 @@ internal async Task ResetColors() internal async Task ResetDWM() { - RunRegFile("DWM fix"); + RunRegFile("DWM fix.reg"); await Task.Delay(100); } diff --git a/RestoreWindow.xaml.cs b/RestoreWindow.xaml.cs index b3e562f..21b9120 100644 --- a/RestoreWindow.xaml.cs +++ b/RestoreWindow.xaml.cs @@ -118,11 +118,11 @@ private void importReg_Click(object sender, RoutedEventArgs e) return; string fileName = dialog.SafeFileName; - Settings.RunRegFile(savePath + "\\" + fileName); var confirmResult = MessageBox.Show("Are you sure to load settings from this file?", "", MessageBoxButton.YesNo, MessageBoxImage.Question); if (confirmResult == MessageBoxResult.No) return; + Settings.RunRegFile(savePath + "\\" + fileName); MessageBox.Show("Settings restored successfully. \n\nThe program will now close. You should restart the device to apply changes.", "Information", MessageBoxButton.OK, MessageBoxImage.Information); App.Current.Shutdown();