Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Der-Floh committed Nov 16, 2022
1 parent f0e31d2 commit d9049d5
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions Windows11OldCMenuSetter/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ static char CheckAlreadySet()
SendError("Deleting Subkeys...");
Registry.CurrentUser.OpenSubKey(@"Software\Classes\CLSID\", true).DeleteSubKeyTree("{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}");
SendError("Successfully deleted Subkeys");
RestartExplorer();
return 'd';
}
else
Expand Down Expand Up @@ -162,18 +163,15 @@ static void SendInColor(string message, ConsoleColor color)

static void RestartExplorer()
{
using (Process process = new Process())
Process process = new Process();
process.StartInfo = new ProcessStartInfo
{
process.StartInfo = new ProcessStartInfo
{
FileName = "taskkill.exe",
Arguments = "-f -im explorer.exe",
WindowStyle = ProcessWindowStyle.Hidden
};
process.Start();
process.WaitForExit();
process.StartInfo = new ProcessStartInfo("explorer.exe");
process.Start();
}
FileName = "taskkill.exe",
Arguments = "-f -im explorer.exe",
WindowStyle = ProcessWindowStyle.Hidden
};
process.Start();
process.WaitForExit();
Process.Start("explorer.exe");
}
}

0 comments on commit d9049d5

Please sign in to comment.