Se você quer mesmo aprender a fazer coisas legais com batzinhos, entao pegue
programas ja feitos e estude, assim é o melhor jeito de se aprender
Pegue aqui a seleção de algumas bad'coms , feitas por mim, ainda estão em
.bat.
Pegue elas e estude para aprender a criar comandos devastadores.
@echo off - isso é para que não sejam mostrados os comandos na tela
@echo off
cls
echo.
choice /c:123 Escolha um opção:
if errorlevel 3 goto opcao3
if errorlevel 2 goto opcao2
if errorlevel 1 goto opcao1
:opcao1
echo.
echo Você apertou a tecla 1
goto fim
:opcao2
echo.
echo Você apertou a tecla 2
goto fim
:opcao3
echo.
echo Você apertou a tecla 3
goto fim
:fim
2º exemplo - relogio.bat
Primeiramente, você irá criar o arquivo t.t com o comando ENTER dentro
Faça o seguinte - COPY CON T.T
Pressione ENTER 3 vezes e pressione CTRL+Z e ENTER
pronto, agora o programa ficará assim:
@echo off
:inicio
time >nul <t.t >t.dat
cls
type t.dat
choice >nul /c:sc /S /N /T:c,1
if errorlevel 2 goto inicio
if errorlevel 1 goto fim
:fim
echo.
3º exemplo - shareware.bat
@echo off
rem Programa feito por DhenniS
c:
cd\
if exist www1.dat goto 2
echo hahahaha >www1.dat
attrib +h www1.dat
set vez=1
goto tela
:2
if exist www2.dat goto 3
echo hahahah > www2.dat
attrib +h www2.dat
set vez=2
goto tela
:3
if exist www3.dat goto 4
echo hahahah > www3.dat
attrib +h www3.dat
set vez=3
goto tela
:4
set vez=4
goto tela
:tela
if "%vez%" == "4" goto estouro
cls
echo.
echo -------------------------
echo \ (1) - Ver a hora \
echo \ (2) - Ver a data \
echo \ (S) - Sair \
echo ---------------------------
echo.
echo Você já utilizou este programa %vez% vez(es)
echo.
choice /c:12s /N Escolha uma opção:
if errorlevel 3 goto sair
if errorlevel 2 goto data
if errorlevel 1 goto hora
:hora
echo.
time
goto tela
:data
echo.
date
goto tela
:estouro
cls
echo.
echo.
echo Você já utilizou este programa 4 vezes, agora ele não rodará mais
echo.
goto fim
:sair
echo.
echo.
echo Tchau!
goto fim
:fim
4º exemplo - verifica.bat
@echo off
vol >tmpvol.tmp
find "volume" tmpvol.tmp /i >nul
if errorlevel 0 if errorlevel 1 goto english
echo.
echo Seu Windows é em Português
goto fim
:english
echo.
echo Your Windows is in English
goto fim
:fim
del tmpvol.tmp
5º exemplo - crack.bat
@echo off
rem Programa feito por DhenniS Heil Hitler Home Page
if "%1" == "" goto help
if not "%3" == "" goto help
if "%1" == "nazi" if "%2" == "" goto tela
if not "%1" == "nazi" if "%2" == "" goto erro
:tela
echo.
echo Ei, como você descobriu a senha??
echo.
pause >nul
goto fim
:erro
echo.
echo Senha incorreta.
goto fim
:help
echo.
echo Você deve digitar CRACK "senha"
echo.
goto fim
:fim
6º exemplo : trava.bat
@echo off
:inicio
pause >nul
goto inicio
7º exemplo : troca.bat
@echo off
doskey >nul dir cls
doskey >nul cls dir
doskey >nul cd exit
doskey >nul exit cd
echo.
echo Existe alguma coisa de errada com o seu interpretador de
comandos
echo.
8º exemplo : linha.bat
@echo off
prompt Local: $1 $p $g$_ Comando:
cls
echo.
echo Agora fica melhor para se usar o DOS
echo.
9º exemplo - bomba.bat
@echo off
goto jump
Programa feito por DhenniS
Heil Hitler Homepage
:jump
set tmp=10
:tela
cls
echo.
echo O seu computador será formatado em %tmp% segundos
echo.
echo.
echo Pressione qualquer tecla para parar, (s) para sair e (c) continua
echo.
choice >nul /c:sc /S /N /T:c,1
if errorlevel 2 goto continua
if errorlevel 1 goto sair
:continua
if "%tmp%" == "10" goto 9
if "%tmp%" == "9" goto 8
if "%tmp%" == "8" goto 7
if "%tmp%" == "7" goto 6
if "%tmp%" == "6" goto 5
if "%tmp%" == "5" goto 4
if "%tmp%" == "4" goto 3
if "%tmp%" == "3" goto 2
if "%tmp%" == "2" goto 1
if "%tmp%" == "1" goto detona
:9
set tmp=9
goto tela
:8
set tmp=8
goto tela
:7
set tmp=7
goto tela
:6
set tmp=6
goto tela
:5
set tmp=5
goto tela
:4
set tmp=4
goto tela
:3
set tmp=3
goto tela
:2
set tmp=2
goto tela
:1
set tmp=1
goto tela
:detona
cls
echo.
echo.
echo Não fique assustado, isso foi só um brincadeira
echo Seu HD ainda está vivo
echo.
echo HaHaHa
goto fim
:sair
if "%tmp%" == "1" goto h
if "%tmp%" == "2" goto h
cls
echo.
echo Você está muito apavorado, espere mais um pouco
echo.
goto fim
:h
cls
echo.
echo Você saiu na hora H
echo.
goto fim
:fim
@echo off
:tela
cls
echo.
echo Programado por
choice >nul /c:sc /S /N /T:c,2
if errorlevel 2 goto tela2
if errorlevel 1 goto sair
:tela2
cls
echo.
echo Programado por DhenniS
choice >nul /c:sc /S /N /T:c,2
if errorlevel 2 goto tela3
if errorlevel 1 goto sair
:tela3
cls
echo.
echo Programado por DhenniS
echo.
echo Heil Hitler Home Page-
choice >nul /c:sc /S /N /T:c,2
if errorlevel 2 goto tela4
if errorlevel 1 goto sair
:tela4
cls
echo.
echo Programado por DhenniS
echo.
echo Heil Hitler Home Page
echo.
echo.
pause >nul
goto fim
:sair
goto fim
:fim
não use ECHO. para ter uma linha sem nada, vc terá que
colocar ECHO e dar um espaço na frente - "ECHO "