I am a former field technician for a very large Telecommunications company and part of my job was to install Anti-Virus software for customers during network installations. The problem is many residential systems are already infected or bogged down with startup programs making the simplest task turn in to nightmares. This includes running msconfig and swapping between tabs.
I have written a utility that will automatically run from a USB boot drive to temporarily disable all the programs in startup then automatically reboot the machine but I have 2 issues I need to resolve so technicians can spend time on more important task. One issue is my call to restart the machine makes it impossible to determine if my code is done executing because some systems can take hours to process my automated shutdown code due to limited memory resources. The other issue is with rouge software that has a background worker to detect if they have been disabled in startup and reactivates themselves milliseconds after I disable them.
I have a genuine cause to generate a BSOD to prevent these issues but none of the legacy procedures work on Win10.
KeBugCheck
generates a:
DLLNotFoundError
...if I try to import NtosKrnl.exe with an extern call
Source: programmatically trigger BSOD Windows10 (Access Denied With Elevated Privs)
System.Diagnostics.Process.GetProcessesByName("csrss")[0].Kill();
Windows10 (This works but also triggers shutdown calls for rouge software)
public static void ShutDown(bool Forced)
{
Process[] processess = Process.GetProcesses();//Get all the process in your system
foreach (var process in processess)
{
try
{
Console.WriteLine(process.ProcessName);
process.PriorityClass = ProcessPriorityClass.BelowNormal; //sets all the process to below normal priority
process.Kill();
}
catch (Exception E)
{
Console.WriteLine(E.Message + " :: [ " + process.ProcessName + " ] Could not be killed");
}
}
}
Windows10 (Exiting in middle of Ping has no effect)
public static void ShutDown(bool Forced)
{
Ping Tcp = new Ping();
Byte[] buffer = new Byte[0];
Tcp.Send("www.microsoft.com", 12000, buffer);
Environment.Exit(1);
}
It would be nice to include a Third-Party utility I could extract from a resource file and execute to simulate a crash like NotMyFault but their EULA has some tight restrictions that limit me. I do not want any legal trouble.