Jump to content

BSoD


matthieuvb
 Share

Recommended Posts

I copied the bluescreen,

and it looks very real!

#Region
#AutoIt3Wrapper_icon=BSoD.ico
#AutoIt3Wrapper_outfile=..\BlueScr.exe
#AutoIt3Wrapper_Res_Description=BSoD
#AutoIt3Wrapper_Res_Fileversion=1.0.0.1
#AutoIt3Wrapper_Add_Constants=n
#EndRegion

#Include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#NoTrayIcon

_WinAPI_ShowCursor(False)

HotKeySet("{F8}", "ExitBlueScr")

Global $DesktopWidth = @DesktopWidth, $DesktopHeight = @DesktopHeight
Global $DesktopDepth = @DesktopDepth, $DesktopRefresh = @DesktopRefresh


GUICreate("Bluescr", @DesktopWidth + 4, @DesktopHeight + 4)
GUISetBkColor(0x0000A0)
$Label = GUICtrlCreateLabel("A problem has been detected and Windows has been shut down to prevent damage" & @CRLF & _
"to your computer." & @CRLF & _
@CRLF & _
"The problem seems to be caused by the following file: SPCMDCON.SYS" & @CRLF & _
@CRLF & _
"PAGE_FAULT_IN_NONPAGED_AREA" & @CRLF & _
@CRLF & _
"If this is the first time you've seen this stop error screen," & @CRLF & _
"restart your computer. If this screen appears again, follow" & @CRLF & _
"these steps:" & @CRLF & _
@CRLF & _
"Check to make sure any new hardware or software is properly installed." & @CRLF & _
"If this is a new installation, ask your hardware or software manufacturer" & @CRLF & _
"for any Windows updates you might need." & @CRLF & _
@CRLF & _
"If problems continue, disable or remove any newly installed hardware" & @CRLF & _
"or software. Disable BIOS memory options such as caching or shadowing." & @CRLF & _
"If you need to use Safe Mode to remove or disable components, restart" & @CRLF & _
"your computer, press F8 to select Advanced Startup Options, and then" & @CRLF & _
"select Safe Mode." & @CRLF & _
@CRLF & _
"Technical information:" & @CRLF & _
@CRLF & _
"*** STOP: 0x00000050 (0xFD3094C2,0x00000001,0xFBFE7617,0x00000000)" & @CRLF & _
@CRLF & _
@CRLF & _
"***  SPCMDCON.SYS - Address FBFE7617 base at FBFE5000, DateStamp 3d6dd67c", 10, 10, @DesktopWidth - 10, @DesktopHeight - 10)
GUICtrlSetFont(-1, 17, 100, -1, "Lucida Console")
GUICtrlSetColor(-1, 0xD8D8D8)
GUICtrlSetOnEvent(-1, "None")
GUISetState()
$iWidth = 1024
$iHeight = 768
$iBitsPP = 32
$iRefreshRate = 60
BlockInput(1)
If $iWidth = @DesktopWidth And $iHeight = @DesktopHeight And $iBitsPP = @DesktopDepth And $iRefreshRate = @DesktopRefresh Then
GUISetBkColor(0x000000)
GUICtrlSetState($Label, $GUI_HIDE)
_ChangeScreenRes(800, 600, $iBitsPP, $iRefreshRate)
Sleep(1000)
GUICtrlSetState($Label, $GUI_SHOW)
GUISetBkColor(0x0000A0)
_ChangeScreenRes($iWidth, $iHeight, $iBitsPP, $iRefreshRate)
Else
_ChangeScreenRes($iWidth, $iHeight, $iBitsPP, $iRefreshRate)
EndIf
While 1

WEnd


Func _ChangeScreenRes($i_Width = @DesktopWidth, $i_Height = @DesktopHeight, $i_BitsPP = @DesktopDepth, $i_RefreshRate = @DesktopRefresh) ;from ChangeResolution.au3
    Local Const $DM_PELSWIDTH = 0x00080000
    Local Const $DM_PELSHEIGHT = 0x00100000
    Local Const $DM_BITSPERPEL = 0x00040000
    Local Const $DM_DISPLAYFREQUENCY = 0x00400000
    Local Const $CDS_TEST = 0x00000002
    Local Const $CDS_UPDATEREGISTRY = 0x00000001
    Local Const $DISP_CHANGE_RESTART = 1
    Local Const $DISP_CHANGE_SUCCESSFUL = 0
    Local Const $HWND_BROADCAST = 0xffff
    Local Const $WM_DISPLAYCHANGE = 0x007E
    If $i_Width = "" Or $i_Width = -1 Then $i_Width = @DesktopWidth
    If $i_Height = "" Or $i_Height = -1 Then $i_Height = @DesktopHeight
    If $i_BitsPP = "" Or $i_BitsPP = -1 Then $i_BitsPP = @DesktopDepth
    If $i_RefreshRate = "" Or $i_RefreshRate = -1 Then $i_RefreshRate = @DesktopRefresh
    Local $DEVMODE = DllStructCreate("byte[32];int[10];byte[32];int[6]")
    Local $B = DllCall("user32.dll", "int", "EnumDisplaySettings", "ptr", 0, "long", 0, "ptr", DllStructGetPtr($DEVMODE))
    If @error Then
        $B = 0
        SetError(1)
        Return $B
    Else
        $B = $B[0]
    EndIf
    If $B <> 0 Then
        DllStructSetData($DEVMODE, 2, BitOR($DM_PELSWIDTH, $DM_PELSHEIGHT, $DM_BITSPERPEL, $DM_DISPLAYFREQUENCY), 5)
        DllStructSetData($DEVMODE, 4, $i_Width, 2)
        DllStructSetData($DEVMODE, 4, $i_Height, 3)
        DllStructSetData($DEVMODE, 4, $i_BitsPP, 1)
        DllStructSetData($DEVMODE, 4, $i_RefreshRate, 5)
        $B = DllCall("user32.dll", "int", "ChangeDisplaySettings", "ptr", DllStructGetPtr($DEVMODE), "int", $CDS_TEST)
        If @error Then
            $B = -1
        Else
            $B = $B[0]
        EndIf
        Select
            Case $B = $DISP_CHANGE_RESTART
                $DEVMODE = ""
                Return 2
            Case $B = $DISP_CHANGE_SUCCESSFUL
                DllCall("user32.dll", "int", "ChangeDisplaySettings", "ptr", DllStructGetPtr($DEVMODE), "int", $CDS_UPDATEREGISTRY)
                DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND_BROADCAST, "int", $WM_DISPLAYCHANGE, _
                        "int", $i_BitsPP, "int", $i_Height * 2 ^ 16 + $i_Width)
                $DEVMODE = ""
                Return 1
            Case Else
                $DEVMODE = ""
                SetError(1)
                Return $B
        EndSelect
    EndIf
EndFunc

Func None()

EndFunc

Func ExitBlueScr()
    _WinAPI_ShowCursor(True)
    _ChangeScreenRes($DesktopWidth, $DesktopHeight, $DesktopDepth, $DesktopRefresh)
    Exit
EndFunc
Edited by Matthieuautoitscripter
[font=Helvetica, Arial, sans-serif][background=rgb(252, 252, 250)][/background][/font]
Link to comment
Share on other sites

A possible improvement might be to have the script remember the monitor resolution and then change it back when you exit the script. Not that it's a big deal or anything.

Link to comment
Share on other sites

A possible improvement might be to have the script remember the monitor resolution and then change it back when you exit the script. Not that it's a big deal or anything.

Of course it's a big deal. It's a huge deal as a matter of fact.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

A possible improvement might be to have the script remember the monitor resolution and then change it back when you exit the script. Not that it's a big deal or anything.

An easy way of doing that is simply setting the width and height of the screen (using @DesktopHeight and @DesktopWidth) to variables before anything else happens in the script. Then, last thing it does is call those variables to reset the screen size back.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

An easy way of doing that is simply setting the width and height of the screen (using @DesktopHeight and @DesktopWidth) to variables before anything else happens in the script. Then, last thing it does is call those variables to reset the screen size back.

Is it just me or was this built into the original script? I have it on lines 18 and 19 on a version I got soon after this was released...

Link to comment
Share on other sites

Is it just me or was this built into the original script? I have it on lines 18 and 19 on a version I got soon after this was released...

Yep, looking back over the code, it's in there. So now I must wonder why it was brought up that it would be a good feature if the feature is already there :mellow:

Just tried and and looks great. If it could cover the taskbar on win 7 it would look even better. Also hot key to exit is not working.

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

It does it when you exit using the hotkey... I would have preferred it to do it whenever the script exits though, as I forgot what the hotkey was (well... I assumed it was escape actually :mellow: ) and had to open task manager and switch to scite to find out what it was :P

I tried the script uncompiled and the hotkey would not work, so I thought it might need compiled but still not hotkey success. I believe as was mentioned before, the blockinput is blocking the hotkey

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

I tried the script uncompiled and the hotkey would not work, so I thought it might need compiled but still not hotkey success. I believe as was mentioned before, the blockinput is blocking the hotkey

Ah right.... You do know that Ctrl+Alt+Delete always turns off BlockInput right? Thats how I was doing it :mellow:
Link to comment
Share on other sites

A good use would be if you could compile it as a screensaver. Anyone fiddling with your PC would get a shock!

BlueScreen from ... MS itself.

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

it's for fun:)

Would be better If I could use the 'Message Table' of the file 'ntoskrnl.exe', would be for the local language:

_ResourceGetAsString(1073741951, 11, 0, @SystemDir & "\ntoskrnl.exe")
This example does not work... Resources UDF (Author: Zedna)

Message Table in Portuguese (Viewed with Resource Hacker):

1073741951,     "Foi detectado um problema e o Windows foi desligado para evitar danos\nao computador."
1073741952,     "O problema parece ser causado pelo seguinte arquivo:\n"
1073741953,     "Se esta for a primeira vez que vocˆ vˆ esta tela de erro de parada,\nreinicie o computador. Se a tela for exibida novamente, siga\nestas etapas:\n"
1073741954,     "Certifique-se de que qualquer novo item de hardware ou software est  corretamente instalado.\nSe a instala‡ao for nova, pe‡a ao fabricante do hardware ou software\nas atualiza‡oes do Windows 2000 de que vocˆ necessitar.\n\nSe os problemas persistirem, desative ou remova qualquer item de hardware\nou software instalado recentemente. Desative as op‡oes de mem¢ria BIOS, como cache ou sombreamento.\nSe precisar usar o modo de seguran‡a para remover ou desativar componentes, reinicie\no computador, pressione F8 para selecionar as op‡oes avan‡adas de inicializa‡ao e\nselecione o 'Modo de seguran‡a'."
1073741955,     "Informa‡oes t‚cnicas:"

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...