Introduction: Create an Alarm in Batch
Alright... In this instructable I will show you how to create an alarm in a batch file. When activated, a tone will come from the internal speaker of your computer, over, and over. If you are lazy, you can just download it in the last step!I highly advise you not to play around with batch if you are not familiar with it! If you aren't, check out these basic,Intermediate, and advanced, batch tutorials.
Step 1: Capture the "Alarm"
In order to create an alarm, we will need a sound. There is a special character that when in a batch file or entered in command prompt, will cause an error and a tone will play through the internal speaker. In order to get that special character, you need to do a key combo in command prompt then save it so you can copy and paste it. That's what I'll do in the next few steps.
Step 2: Open Command Prompt
Goto start> run, then type in cmd, then press OK
or
Goto start> All Programs> Accessories> Command Prompt
Step 3: Change Directory
cd desktopThat will change the directory command prompt is in, to the desktop.
Step 4: Echo, ECHO!
echo @echo
Step 5: Key Combo
Now hold down ALT & 7 (must be on the numpad) at the same time. "/\G" should appear. See picture.
Step 6: Save As Batch
>alarm.bat">" means "output" and "alarm.bat" is what you are outputting.
Make sure you remember the ".bat" part, or it won't be saved as a batch file.
Step 7: Obtain the Character
Right click on the newly created batch file and click Edit. Then select the box looking letter that is the character, and copy it. You've now successfully captured the rare alarm character! Clap Clap Clap...
Step 8: Delete
You can now delete the file "Alarm.bat"
Step 9: Alarm Code
@echo off:alarm"@echo off" means that it won't show you whats happening. Keeps batch files clean.
":alarm" is a label
Then paste the special character in a new line under that.
Next type in the next line:
clsgoto alarm"cls" means clear screen. It just removes everything on screen off the command prompt. Sorta like a dry erase board. "goto alarm" means that it will goto the label ":alarm"
Step 10: Save As
Goto File> Save As, and save it as "Alarm.bat"
Step 11: Done!
You can now run the batch file "Alarm.bat" and it will sound an alarm through your computer speakers! One neat thing to do is if you have a password protected batch file, you can sound an alarm if they get the password wrong! Another thing you can do, is make an alarm clock! Good luck, and have fun!

Participated in the
The Instructables Book Contest
88 Comments
6 years ago
how can i adjust the speed of moving , en make sound
9 years ago on Introduction
When we create alarm with batch files. Can we use other songs eg.*.MP3 .
15 years ago on Introduction
For the people who don't have number pads to get the "special character" just go to the character map tool, pick any font, and go to unicode 2022. (Bullet)
Reply 12 years ago on Introduction
Actually, I thought everyone had a number pad. On most laptops, there are number pad key markings on a set of keys on the right side of your keyboard - to use them, hold Fn and press one. (For example, to get a NumPad0 on my laptop (very important for the Alt+0160 character!) I press Fn+M.)
Reply 9 years ago on Introduction
not all special symbols are valid, batch file or cmd only read special ASCII symbols. go get ASCII symbols that valid for batch file and cmd, get it here
http://textuploader.com/tprq
9 years ago on Introduction
this is cool, but i made my own batch file, that allow you to download file from internet, just like download manager. please visit this instructables
https://www.instructables.com/id/How-To-download-File-on-internet-using-batch-file/
thanks dude!
10 years ago on Introduction
where do you think i should add the alarm code to in this locker code:
@ECHO OFF
title Folder Private
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== 345742 goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
10 years ago on Introduction
how do i add the alarm batch file to my Locker batch file?
10 years ago on Step 11
it didn't work, can you help me
11 years ago on Step 5
you can use ctrl+G too!
13 years ago on Introduction
I clicked on your link and got this:
@echo off
color fa
title password required
set tries=4
:top
cls
set /a tries=%tries%-1
if %tries% equ 0 (goto penalty)
echo you have %tries% attempts left.
echo please enter password
set /p password=
if %password%==boom (start www.google.com)
goto top
:penalty
exit
It works fine but I can't change the destination when you get the password right to a vbs, other batch, file folder, or word doc. Plz help
Reply 11 years ago on Introduction
Heres the code you wanted
@echo off
color fa
title password required
set tries=4
:menu
if exist pass.bat goto top
goto passme
:passme
set /p pass=Enter Password:
echo set pass=%pass%>pass.bat
goto top
:top
cls
set /a tries=%tries%-1
if %tries% equ 0 (goto penalty)
echo you have %tries% attempts left.
set /p password=Please Enter Password:
call pass.bat
if %password%==%pass%(goto start
:start
start www.google.com
goto good
:good
echo Password Right
pause
:penalty
exit
12 years ago on Introduction
┌∩┐
12 years ago on Step 11
It dosen't work!!! all it says is " "" is not recognized as a internal or external command... etc."
12 years ago on Step 11
I NEED to know how to exit this thing!
Reply 12 years ago on Step 11
press ctrl + c and then close the cmd window
12 years ago on Step 11
you just close cmd. that works for me!
13 years ago on Introduction
what would be a script for a password that if typed incorrectly, the alarm would sound, all I see here are bits and pieces and I don't understand exactly what to type into notepad.
Reply 13 years ago on Introduction
If you don't know how to put it together, then I don't think you should even try. Read some basic batch tutorials or 'ibles first.
13 years ago on Introduction
good for you i got it thanks kidu