Want to get even this Halloween? Want to scare somebody with nothing but a few lines of code? Here's how it can be done...
So, with arguably the best holiday quickly approaching us, I thought I'd do a fun post on a cool way to prank your friends, enemies, or maybe even the whole office (we'll get onto that in another tutorial). This one is for anybody that loves either practical jokes or Halloween, which is everyone, right?
The premise of this digital scare is very simple and only uses two features of a Windows machine: batch files and task scheduling. Much of the success of this will be down to your creativity and/or your ability to draw cool ASCII pictures. Anyway, without further delay, here's how we're going to do this.
For those of you that don't know, a batch file is, on the most basic level, a standard-formatted document that runs a bunch of command line commands after each other or in a sequence that is defined by the programmer's implemented logic. They're really easy to make and require no special software to run.
The reason we have chosen this is because it looks menacing to those who are not totally computer confident, and we can run some commands from it that will emphasize the effect that our little prank has.
So, the first thing you want to do is open up Notepad, our editor of choice. Below I have prepared a small script for people not familiar with the command line, but it's super easy to create your own if you want a more customized scare.
NOTE: I had to put the file as an attachment since the WHT posting system messed with the ASCII art. I put it as a text file, which you can download right here, so make sure you re-save it as a .bat file.
Okay, admittedly the shutdown may be a little far-fetched, but it all adds to the illusion. All you have to do from now is paste that in a text document, hit Save As, change the type to all files, then save it as something like sysfile.bat (adds authenticity) to the target machine.
I'd just like to emphasize that all of these steps should be done on the target machine, otherwise you'll find that you're pranking yourself.
In the second part of this how-to, we put our little script into action. But not in any old way, oh no, this will appear on the day of Halloween. The first thing we're going to want to do here is navigate to our Start menu and find the Task Scheduler, it should look something like this when you open it:
We're interested in the little button that says "Create Basic Task..." on the Action Bar to the right of the window. It is from here where we will schedule our script to run. This can be done in 7 super simple steps:
- Select "Create Basic Task...."
- Choose a name and a description for your task.
- Since we only want this to run once, select "One Time."
- Punch in the date (the 31st, obviously) and also the time. Make sure you choose a time at which you know your victim will be at their computer.
- Select "Start a Program."
- Browse for and select our .bat file that we created earlier.
- Click "Next" and then "Finish."
So you've got everything set up on your victim's computer. Now all you have to do is make sure you're there to watch when the thing goes off.
Thanks for reading, and Happy Halloween!
PS: For added panic (and a crashed computer), you could always add the line 'start' to the end of the attached file, which will open a new command prompt every half a second or so.
Keep Your Connection Secure Without a Monthly Bill. Get a lifetime subscription to VPN Unlimited for all your devices with a one-time purchase from the new Gadget Hacks Shop, and watch Hulu or Netflix without regional restrictions.