This can be easily done in C#, just call RtlSetProcessCritical from ntdll.dll (don't forget to elevate your privileges! (SeSecurityName I guess)) and just end your process with Environment.Exit(0), BSOD will show up and say that critical process exited.