Skip to content

Commit

Permalink
fixed .reg files not launching
Browse files Browse the repository at this point in the history
  • Loading branch information
ArkadySK committed Jan 3, 2022
1 parent 23aa573 commit 8c386ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions GeneralViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -241,7 +241,7 @@ internal async Task ResetColors()

internal async Task ResetDWM()
{
RunRegFile("DWM fix");
RunRegFile("DWM fix.reg");
await Task.Delay(100);
}

Expand Down
2 changes: 1 addition & 1 deletion RestoreWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8c386ff

Please sign in to comment.