Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to manually BSOD a machine for some testing. I already attempted to use the Registry edit with autohotkey to no avail. I need to pull this off via a script/batch or some other way that can be scripted.

share|improve this question
    
Are you using a USB keyboard? – Hello71 Aug 8 '10 at 15:00
1  
AutoHotkey will not work because the Ctrl-ScrollLock code is contained inside the keyboard driver (which AutoHotkey obviously bypasses). – grawity Aug 8 '10 at 15:58
up vote 6 down vote accepted

I knew that there was a way to to it. I seemed to recall, from many (many!) years ago in my early Windows development days, a simple API call that would cause a system to "blue screen." It's in the Windows DDK. You're looking for KeBugCheck or KeBugCheckEx. It's intended for use by device drivers and will cause the system to break if there's a debugger attached. If there's no debugger, the system will BSOD. Here's the Microsoft article that describes it:

http://msdn.microsoft.com/en-us/library/ff551948(VS.85).aspx

share|improve this answer

You could probably download and install the debugging tools, then script the '.crash' command. I'm not sure the specifics of doing this, but it sounds feasible.

Sources;

http://www.microsoft.com/whdc/devtools/debugging/default.mspx http://stackoverflow.com/questions/667581/simulating-a-bluescreen

share|improve this answer
    
I was thinking...and would guess that if you cannot find a way to script the .crash command directly, you might be able to build a program that finds the WinDbg window and sends keystroke messages to it. I dunno how this works on Windows 7, but it used to be somewhat straightforward on XP using the Win32 API. I might be doable in VBS too, not sure. I haven't played with Windows 7 much. – Nextraztus Aug 8 '10 at 15:15

You can obtain Sysinternal's Process Explorer, run it as administrator, and kill winlogon.exe. Won't be a "traditional" blue screen though.

share|improve this answer

Very easy tool for manual BSOD is http://download.sysinternals.com/files/NotMyFault.zip Just run notmyfault /crash

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .