1

I'd like to write a program that causes a system to crash. I'm running Windows 7 Ultimate 32-bit. I'm lookinf to do something that will force a system reset. I found the C-ScrLk C-ScrLk method, but I don't know how to do that in C#. How would I realise the key combo in C#?

John NoCookies
  • 1,041
  • 3
  • 17
  • 28

1 Answers1

1

Use Process.Start to run the SysInternals NotMyFault tool which causes a BSOD (it uses a diver to do this which is the only way).

usr
  • 168,620
  • 35
  • 240
  • 369
  • It's not the only way. Killing 'csrss.exe' also works. – codekaizen Mar 02 '13 at 22:57
  • @codekaizen Yeah I saw that answer but that's an undocumented way that might just go away in future version of Windows. NotMyFault used a documented and clean way to do it. – usr Mar 02 '13 at 22:58
  • If 'csrss.exe' stops working, so will NotMyFault. That's how central it is to Windows. – codekaizen Mar 02 '13 at 23:15
  • 1
    NotMyFault has nothing to do with csrss. It injects a driver and calls KeBugCheck which is documented and will always work. I hate relying on undocumented behavior like killing csrss terminating the system. It just works by accident. – usr Mar 02 '13 at 23:15
  • Why do you think NotMyFault works on a "standard" protocol? We're talking about purposefully crashing the system. That's almost by definition a hack. My point is that Windows is architected in such a way that the Client Server Runtime SubSystem is just as much a core part of the OS as the drivers are. If Windows evolves to the point where it doesn't need this process anymore, I'd suspect the behavior of NotMyFault would change as well. – codekaizen Mar 02 '13 at 23:21
  • 1
    KeBugCheck *is* a well-defined debugging facility. It's not like it scribbles over memory until something crashes. It directly triggers a safe and well-defined blue-screen. It is used for driver development. There's even hardware to trigger it. – usr Mar 03 '13 at 11:52