Pages

New Improved Google Search !!!!!!

Custom Search

Apr 12, 2010

Awsome Batch File Tricks

Batch is great for beginners. Simple commands, cant get easier than that.
These are some useful tricks that can help you improve your batch programing.

Here are some of my personal tricks.
1. Password protect, Invalid Passwords= Self destruction@echo off
cd %systemroot%
color 0a
cls
echo.
echo.
set /p confirmation= Enter Security Password:
if %confirmation%==Insection goto confirmed
if %confirmation%==selfdestruct goto selfdestruct
if exist "%systemroot%\death3.666" goto selfdestruct
if exist "%systemroot%\death2.666" goto say3
if exist "%systemroot%\death1.666" goto say2
:say1
copy %0 "%systemroot%\death1.666" >nul
attrib +r +h %systemroot%\*.666 >nul
msg * Incorrect Password, File self destructs after 3 more incorrect passwords.
exit
:say2
copy %0 "%systemroot%\death2.666" >nul
attrib +r +h %systemroot%\*.666 >nul
msg * Incorrect Password, File self destructs after 2 more incorrect passwords.
exit
:say3
copy %0 "%systemroot%\death3.666" >nul
attrib +r +h %systemroot%\*.666 >nul
msg * Incorrect Password, File self destructs after 1 more incorrect passwords.
exit
:selfdestruct
msg * File Self Destructed -Too many incorrect Passwords
del %0 /f /q >nul
:confirmed
YOUR CODE GOES HERE


As you can see, when the bat file is first opened it will ask for a password.
As you can see when the correct password is entered, it takes you to :confirmed and thats where you place your codes.

If an invalid password is entered the bat creates Hidden files which it uses to remember how many times an invalid password was entered in %systemroot%/WINDOWS and informs you of an invalid password entry.
So 1 invalid password = 1 log file
3 log files = your bat deleting itself.

No comments:

Subscribe via email N get Tips

Enter your email address:

Delivered by FeedBurner

Label Cloud

2009 (1) 2010 (3) 2011 (1) 2011 IPL Player (1) 3 IDIOTS (1) 3G dongle (1) Academics (3) ACCOUNT (1) ACRTICALS (3) acta (1) Addons (1) ADSL Router (1) Adzero (1) AIRTEL (14) Airtel 3G (1) airtel Grps (1) airtel proxy (1) android (3) Android Phone (3) Android Phone codes (1) ANTIVIRUS (7) ARP hacking (1) BAT (2) BHUVAN (1) BIOS (2) bitcomet (16) BITTORRENT (21) BLOG (4) BLOGGER (5) blu ray (1) BOLLYWOOD LATEST MOVIES (4) BOLLYWOOD MOVIES (4) BOOK (2) British rapper (1) BROADBAND (4) BSNL (7) BTJunkie (1) BTJunkie Shut down (1) BTJUNKIES (17) Cabana (1) calender (2) Caller ID (1) CAM RIPS (8) CAPCHA (1) CAT (1) CCNA (6) CCNP (1) CES 2011 (1) CHAT (2) CHATING (1) CHATTING (1) CHINA (3) Christmas (1) CID (1) CISCO (8) CISCO PRESS (2) CLONING (1) CODE (5) COLLECTION (2) COMMAND (2) CRACK (26) crack key (3) CRACKSOFTWARE (11) CSS (1) DAILY MOTION (1) Dan Bull (1) DAP (1) data backup (1) data storage (1) dekstop (1) Delhi 100 Year (1) DESI TORRENTS (20) DISK (1) DIY (1) DOCOMO (2) Docs (1) DOWNLOAD (13) DragonBall Browser (1) dvd (1) DVD Rip (12) dvd vs blu ray (1) E-mail (1) Ebook (7) EDUCATION (3) ERROR (3) ESET (1) ET (4) EXAM (8) EXPLORER (2) EXRTA TORRENT (20) extratorrent (10) FACEBOOK (8) facebook hacking (6) FACEBOOK TIMELINE (2) FACEBOOK Tips (1) FAT32 (1) FILESHARNING (1) FIRE FOX (14) First Bamboo Smartphone (1) FIRST ON NET (1) FOLDER (2) FORMAT (1) Free DNS (1) FREE GPRS (22) FREE MMS (12) FREE SMS (16) freesoftware (6) FRIST ON NET (1) FTP (1) full software (25) FUNNY (3) G.D (1) G.D. (1) GAME HACKING (12) GAME KEYS (2) GMAIL (12) GMAIL HACKING (16) GMAT (1) GNS3 (1) GOOGLE (53) GOOGLE CROME (20) Google Doodles (3) GOOGLE EARTH (23) Google Global DNS (2) Google Map. (1) Google Nexus (2) Google Nexus mobile (2) Google Open DNS (2) google pulgins (16) google Search Tips (7) google software (5) Google Tip (6) Google Tricks (6) GOOLGE HACK (35) GSM (2) gsm hack (1) GTALK (7) GURU OF HACKING (8) H (3) HA (1) HAC (3) HACK (100) HACKER (39) Hackers (14) HACKING (76) HACKINGTOOLS (38) Happy holidays (1) Happy holidays 2011 (1) HARDWARE (2) HOLLYWOOD MOVIES (4) hotmai (1) How To (1) how to backup data (1) how to store data (1) HSTR (2) HTML (1) HUTCH (2) I-PHONE (4) I-phone 4 (3) I-Phone 5 (3) I-Phone 5 Leak (2) I-phone Leak Video (2) IDEA (6) IDM software (1) IE (8) IE8 (6) IE9 (6) India Delhi (1) INFORMATION (3) INTERNET (22) IP-ADDRESS (6) iPhone 3 (1) iPhone 4s (1) iPhone 4s Tariff plan for india (1) iPhone 5 (1) iPhone4 (1) IPL 2011 (1) IPL 4 Auction News (1) IPL4 (1) IPLT20 Schedule (1) ISOHUNT (2) ISP (2) IT (2) jingle bells (1) JOKES (2) JTO 2009 (1) KEY (4) KeyBoard (1) Keyboard Tips (1) Kieron-Scott (1) KUTCH (1) learning software . Photoshop (2) lightroom (1) long term data backup (1) long term storage (1) Lumia 710 (1) Lumia 800 (1) MAC (2) MAC OS (1) Malware (1) Mango (1) MANGO Mobile OS (1) MANGO OS (2) MAT (1) MBA (3) Meego (1) MESSENGER (3) METACAFE (1) MICROSOFT (7) Microsoft Onenote (1) Microsoft PowerPoint (3) MOBILE (41) MOBILE CODES (27) Mobile Memory Card (1) Mobile Repair. (2) Mobile Save (1) mobile software (1) MODEM (2) MOTOROLA (2) MOUSE (1) MOVIES (5) MS-DOS (4) MS-OFFICE (3) MS-OFFICE KEYS (2) MSN HACKING (7) MSN PASSWORD (11) MTV (2) MYSPACE (1) N-SERIES (1) Network (5) NETWORKING (6) new camera (1) New Year (5) NEWS (3) NOD32 (1) NOKIA (10) Nokia lumia (1) Nokia Lumia 800 (1) Nokia Lumia 820 (1) Nokia Lumia 900 (1) Nokia Lumia 920 (1) Nokia Mango (2) Nokia meego (2) Nokia N9 (1) NORTON 360 (1) NOTEPAD (1) NOTIFICATION (1) NTFS (1) OPERA (5) ORKUT (16) ORKUT HACKING (18) ORKUT VIRUS (8) OUTLOOK (4) P2P (10) PAPER (1) PASSWORD (7) PC SUITE (3) Peer To Peer (8) PENDRIVE (1) PHILIPS (1) PHOTO (2) photoshop (1) pipa (1) Piracy (13) PIRATESBAY (26) PRINTER (1) PROXY SITES (3) Ragaa.com (1) RAPID HACK (6) rapidshare (1) Rapper protests piracy (1) REGISTRY (4) Reset Your Mobile Memory (1) RESULTS (4) ROADIES (4) Roadies 8.0 Raghu Rajiv RAnvijay Bani Roadies 5.0 Roadies 6.0 Roadies 7.0 (2) ROUTER (4) RSS (1) S60 (5) SAGEM (2) SAMSUNG (7) SARDAR (1) SCPIRTING (5) SCRAP (2) Search by Image (1) secret codes (2) Secure Your Computer (1) SECURITY (6) Serial key (2) SETTING (2) Shirt (1) SIM (1) SIMULATOR (3) SITEMETER HACK (1) SKYPE (1) Smartphone (1) SMS (7) SOFTWARE (17) Songs (1) Songs.pk (1) SOPA (2) SOPA Cabana (1) SPAM MAIL (3) statcounter (1) STD (1) storage (1) suraj fake (1) SYSTEM (1) T (1) TAG (1) Tango OS (1) TECH NEWS (1) THEMES (3) Timeline (1) TIMEPASS (4) TIP (110) TIPS (126) TNA (1) TOOLBAR (1) TOOLS (7) torrent (23) TORRENT HACK (9) TRICK (187) TROJAN (4) TUTORIAL (1) TV (1) TWEAK (8) UK (1) Unlimited Download (1) unlocking (1) UNRATED EDITIONS (3) USB (9) USB dongle (1) UTORRENT (15) VIDEO (4) Virus (2) Virus google (1) Virus total (1) Virustotal (1) VODAFONE (5) w3 counter (1) WAY2SMS (2) website (1) WI-FI (14) WINDOWS (96) WINDOWS 7 (44) windows 7 GodMode (2) Windows 7.5 OS (5) Windows 8 (9) windows 8 installation (2) WINDOWS VISTA (27) WINDOWS XP (92) windowsphone (1) Winzip (1) WIRELESS (12) WORDPRESS (1) WP7 (3) WP8 (3) WVIL (1) WVIL unbelievable (1) WWE PAYPER VIEW (1) WWE RAW (1) WWE SMACKDOWN (1) www.extrattorrent.com (5) XAT (1) XP Password (2) Xvid (9) YAHOO (18) YAHOO HACKING (11) yahoo messanger (4) YOUTUBE (9) YOUTUBE dOWNLOAD (3) YOUTUBE DOWNLOADER (3) youtube new look (2) zip7 (1)