Monday, December 5, 2011

Have Fun with Batch(.bat) File | Part-2

Previously we talked about creating and dafination of batch file.
Also created a shutdown bottun for your PC.

Today I will give you some funny batch file example.



Example 2: This batch file would begin to shutdown your computer then cancel it, then pop up the message and exit. Harmless


shutdown -s
pause
shutdown -a
pause
msg * wasn't that scary?!
exit




Example 3:This batch file would pop up a message then shutdown your computer

@echo off
msg * I don't like you
shutdown -c "error! you are too stupid!" -s

Example 4: This vbs script would continually open up notepad!

WScript.Sleep 10
WScript.Sleep 10
Set WshShell = WScript.CreateObject("WScript.Shell")
do
WshShell.Run "notepad"
WScript.Sleep 100
WshShell.AppActivate "notepad"
loop


Example 5: This vbs script would make Caps Lock go on and off repeating!

Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop



N.B.: There are two vbs script are given that are you needed to save not in ".bat" but ".vbs".

Just save them on your friends pc giving some intersting name so that they would eger to open the file.
And enjoy...

:))


No comments:

Post a Comment