Batch Matrix Shutdown Screen

20K2322

Intro: Batch Matrix Shutdown Screen

I always hate the boring old shutdown sequence on my computer, so I made this simple batch file to make it a lot cooler! (This is my first Instructable, so cut me some slack, please.) You can impress your friends with this cool matrix stile shutdown sequence.

Update - July 09, 2009 - Thank You BlaXpirit for helping me make the code significantly smaller.

This is what it will look like:

STEP 1: Create a Batch File

The first step is to create a Batch File:

1.Right click on your desktop and select New.

2.Click on the Text Document option.

3.When the Text Document icon pops up, change the name to (Matrix)*.bat

*The word Matrix in the parenthesis can be substituted with anything you want. Don't actually type the *.

STEP 2: The Code

The next step is to type the code I give you:

1.To edit the BATCH file you made, you right click it and select Edit from the list. This opens up Notepad/Wordpad to edit it.

2.Type or paste this code I give you between the lines, then save:
................................................................................................................................................................................
@echo off
color 2
title Matrix, I HAVE YOU, ESCAPE IS IMPOSSIBLE
echo I Will Now Execute Command, 3hgw5th6p.exe, in 9 seconds. Your Program Files Are History!
timeout 9
set loopvar=1
:looplabel
set /a loopvar=%loopvar%+1
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
if '%loopvar%'=='500' goto endlabel
goto looplabel
:endlabel
shutdown -s -f -t 15 -c "I, Matrix, Declare Victory Over Computer 235.6274.837Gh"
exit
............................................................................................................................................................................
This Command:
@echo off
Tells the computer that you don't want it to display the command words such as "echo" or "title".

This is the color of the words:
color 2
The number 2 can be changed to any of the number/letters at this link: http://www.codeproject.com/KB/recipes/BatchFileColors.aspx

These are the words that are shown on the bar at the top of the screen:
title Matrix, I HAVE YOU, ESCAPE IS IMPOSSIBLE
They can be changed to whatever you want, just it must begin with the word title.

This Command:
Echo I Will Now Execute Command, 3hgw5th6p.exe, in 9 seconds. Your Program Files Are History!
Tells the computer to display whatever is after the word "echo". Any of the words/numbers after the
word "echo can be changed to whatever you want.

This Command,
Timeout 9
Tells the computer to display the number nine then count down the seconds until zero before
continuing. The 9 can be changed to any other number.

The Line:
set loopvar=1
Creates the variable "loopvar" than gives it a denomination of 1.

The Next Line:
:looplabel
Names a point in the script that can be gone back to using the "GoTo" command.

This Command:
set /a loopvar=%loopvar%+1
Tells the computer that every time this part of the script is replayed, it adds one to the variable "loopvar" so once the computer has replayed it 20 times, "loopvar" = 21.

These Lines:
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
Tell the computer to display on the screen a random number.

These Lines:
if '%loopvar%'=='500' goto endlabel
goto looplabel
Is an if/then statement and tells the computer: If the variable "loopvar" equals 500 then move on
to "endlabel" if it does not then jump back up to "looplabel" until "loopvar" equals 500. The number
500 can be changed to any other number, it decides how many times the "echo %random%" is
repeated.

This Command:
endlabel:
Is another jump to point for the "GoTo" statement.

These Lines:
shutdown -s -f -t 15 -c "I, Matrix, Declare Victory Over Computer 235.6274.837Gh"
exit
Tell the computer to start shutting down (shutdown -s -f) after 15 seconds (-t 15) and display a
dalogue box that says "I, Matrix, Declare Victory Over Computer 235.6274.837Gh" (-c "I, Matrix,
Declare Victory Over Computer 235.6274.837Gh") then end the batch file. The -s(Shutdown
command) at the end of the code can be replaced with -l(Log off command) or -r(Restart
command). The numbers after the -t can be replaced by any number. They tell you how long you
have until your computer shuts down. The words in "" after the -c can be replaced with anything.
They make up the message that the computer will tell you.

STEP 3: Run It

Now that your done show your friends your cool shutdown screen! They will be very jealous and be dieing for you to show them how to get it! (Or maybe not)


If you want to make the program full sized then:

1. Right click on the top bar of the program and select Layout.

2.Set the Height and Width of the window to 300.

22 Comments

It works, But, if you're smart & Quick enough.. you can:

1. Quickly goto start and then run
2. Type shutdown -a (Which aborts the shutdown / logoff)

can you make it so it logs off instead of shutting down???
Yeah I agree. My friends all think that batch is 'like the most epic thing ever'. I know python but I don't know how to do something like that
can u make it full screen and without the X(quit) button at the top
I copied/pasted the %random% about 7 times and it seemed to work.
I doubt it, but if you right-click on the title bar, choose properties, layout, you can change all of the parameters in realation to how the window appears, try changing these settings.  also, you would have to do this each time, but if you plress ALT+ENTER while a batch file is the active window, it will make if full screen, as per your request but this is not automatic, unless you can find a command to do this and please tell me if you do.
--
sorry my comment is so disorganized and scattered, I'm really busy.
I hope this doesnt really delete my files...
It doesn't, It only displays something random 50000 times give or take, then shuts down your computer.
hey, that code is TOO BIG!!!
Although the idea of this program is stupid, i'll post smaller code...

@echo off
color 2
title Matrix, I HAVE YOU, ESCAPE IS IMPOSSIBLE
echo I Will Now Execute Command, 3hgw5th6p.exe, in 9 seconds. Your Program Files Are History!
timeout 9
set a=1
:l
set /a a=%a%+1
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
if 'a'=='10000' goto e
goto l
:e
shutdown -s -f -t 15 -c "I, Matrix, Declare Victory Over Computer 235.6274.837Gh"
exit
I appreciate your help in trying to make the code better, but when I ran your script and I am sorry to say it never ended even after 5 min. There is no real point of this code except as a way to learn some coding in bat and to experiment with it like you did trying to find a simpler solution to it.
Sorry, I saw that the code didn't run correctly, but didn't have time to check it...
So, this is the right one:
(Note that "color a" looks better than "color 2" (may be))

@echo off
color a
title Matrix, I HAVE YOU, ESCAPE IS IMPOSSIBLE
echo I Will Now Execute Command, 3hgw5th6p.exe, in 9 seconds. Your Program Files Are History!
timeout 9
set loopvar=1
:looplabel
set /a loopvar=%loopvar%+1
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
if '%loopvar%'=='500' goto endlabel
goto looplabel
:endlabel
shutdown -s -f -t 15 -c "I, Matrix, Declare Victory Over Computer 235.6274.837Gh"
exit
@echo off color 2 title Error 614: Internal Malfunction echo Critical Error! timeout 9 :loop echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% goto :loop
it wont work properly where you put goto :loop it should be goto loop with no :
Is there a way to stop the loop after about 1000 cycles so it can goto the next command?
(i.e shutdown -s -f -t 1 -c "computer shutting down")
Here is a way you can make it repeat:

@echo off
color 2
title Error 614: Internal Malfunction
echo Critical Error!
timeout 9
set c=1
:loop
If %c% EQU 1 set c=2
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
If %c% EQU 2 set c=3
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
If %c% EQU 3 set c=4
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
If %c% EQU 4 set c=5
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
If %c% EQU 5 set c=6
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
If %c% EQU 6 set c=7
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
If %c% EQU 7 set c=8
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
If %c% EQU 8 set c=9
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
If %c% EQU 9 set c=10
If %c% EQU 10 GOTO end
goto loop
:end
pause
is posible that it don't work vith vista?
I don't think so. I run vista and it works fine for me. What happens when you try it?
i've found the problem, i used the notebook , not the wordpad
More Comments