The Close Down Windows CD

 
Home    Tutorials    The Close Down Windows CD
 

Here is an description of how to create a CD that will switch off Windows (without asking first!) every time it is inserted into the CD-ROM drive. If you think this sounds too good to be true, I have to admit that I did not belive it either before I actually got around of testing it myself. 

It really is something that is easy to do, and it does not require any special knowledge, just follow the instructions below. But before you start, have in mind that it will not work on PC's which have Autorun disabled. I would also like to mention that it should work with all versions of Windows, but it is only tested with Windows 95, 98 & XP.


But first of all!
First of all I would like to say that I will NOT be held responsible for any loss of unsaved data or other damage that might occur by following the instructions described below. Another thing is that if you plan to use the Close down Windows CD as a prank on somebody, make sure that he/she can handle the joke first. Needless to say - you do all this at your very own risk!!!


And here is how it's done:
Windows 9x and XP have various methods of doing stuff, and the command for shutting down the PC is no exception. So in order to make the Windows close down CD work on all versions of Windows, things has to be done like below:

There are two text files that needs to be created, and you can use Notepad or any other text-editor for doing this, just remember that it must be saved as plain text.


Textfile 1.
The first text file to create has to be called "BYEBYE.BAT" and must contain the following two lines (the first is for Win9x and the second is for WinXP):
  
RunDLL32.exe User,ExitWindows
ShutDown -s -t 10 -c "Bye Bye......" -f

Textfile 2.
The second file to create has to be called "AUTORUN.INF" and must contain the following two lines:
  
[autorun]
open=BYEBYE.BAT

You can just copy and paste the lines into Notepad. After you have done this, start your CD burning program. Now you have to burn a new data CD, what you want to include on this CD is entirely up to you, just make sure that you select the "BYEBYE.BAT" and "AUTORUN.INF" files you created earlier, the location of these files has to be in the main directory of the CD.

When you are finished, it is time to test if it works like it should. Just eject the CD and insert it again (after you have saved any un-saved projects you are running :-). If everything went as planned, Windows will now shut down. Have in mind that regardless of what Windows version you are using, an error message might appear on the screen, but don't worry - this is normal!

And that's it, really easy to do wasn't it?

NB! If you want to test if things works as they should before you burn the CD, you can of course do this by double clicking the "BYEBYE.BAT" icon.



Troubleshooting.
There is one thing I can think of that might lead to problems with creating the two files mentioned above, this really depends upon the way you have configured Windows. If the system is set to hide file extensions for known file types, it might happen that when the files are saved they will be called "BYEBYE.BAT.TXT" and "AUTORUN.INF.TXT" instead of "BYEBYE.BAT" and "AUTORUN.INF".

If you encounter this problem you can either configure the system so that it doesn't hide file extensions for known file types and try again, or you can click Start and select Run, then type in (or copy & paste) the following line:

Cmd.exe /C "Echo Hello >C:\NewBATfile.BAT"

Then click OK. Now a new file called "NewBATfile.BAT" should have been created in C:.Now it is time to create a new file called "NewINFfile.INF", so just click Start and select Run again, but this time enter (or copy and paste) the following instead:   

Cmd.exe /C "Echo Hello >C:\NewINFfile.INF"

And then click OK again. Now you have created two files that you can work with, so open a new Notepad window, then go into C: and drag & drop the "NewBATfile.BAT" file into Notepads window (double clicking it won't work). Now you can replace the "Hello" line with the previously mentioned lines for the "BYEBYE.BAT" file, when you are finished, save the file. Then repeat the whole process for the "NewINFfile.INF" file, but this time replace the "Hello" line with the lines for "AUTORUN.INF" instead. 

When you are finished, rename "NewBATfile.BAT" to "BYEBYE.BAT" and "NewINFfile.INF" to "AUTORUN.INF". You might wonder why the files first had to be created by using the names mentioned above instead of using the names that they would end up with directly, but this is because of safety reasons. The thing is that when the output of a command is re-directed into a file, any already existing file will be overwritten!. So it is best to get used to using unusual file names for such kind of tasks, this way the risk of overwriting an important file gets minimized.



For Amiga owners only.
If you want to make a CD that closes down Windows on your Amiga, remember to use CrossDOS (or something similar) to convert the text to PC text (in particular, this will convert LF to CR/LF linefeeds).


Final words.
The original version of this article did only include instructions for creating a close down CD that would work with Windows 9x, this is the reason why I decided to re-write it. Hopefully it should now cover all versions of Windows (starting from Win95), but as previously said - it is only tested with Windows 98 & XP. If you encounter any problems with other Windows versions, please notify me by sending a mail to: elger@home.no

The first version of "The Close Down Windows CD" article was based upon instructions that I found in the documentation that follows the distribution of MakeCD (which is a Amiga program), these instructions was written by Stefan Momberger.


    Followed a link? Please go to the Main Site                   © Roger E. Håseth 2004 - 2006