Post by vash on Oct 28, 2007 22:52:38 GMT -5
`~MS-DOS Batch files easy Tutorial~`
1. Easy enough you are going to need notepad.
2. ok first there are easy commands like the once listed below
@echo " " - creates a line of text (insert desired text in to blank space, and take away quotation marks)
-i - Display GUI interface, must be the first option
-l - Log off (cannot be used with -m option)
-s - plain, old shutdown
-r - restart
-a - abort shutdown
-m \\computername - remote computer shutdown, reboot, or abort
-t xx - set countdown(insert # of seconds into xx)
-c " " - add a message to shutdown window (insert message into blank space, keep quotation marks)
-f - shutdown all applications without warning
3. These are simple commands which are good to know. Now typing what you now know u can type stuff like msg * hello which will simple bring up a windom saying hello u can change the text to anything.
4. Now to save a batch file u simple hit file then save and then put the name u want and put .bat behind it.
5. Here is an example of a quick batch file I made for an example (warning do not open this batch if u decide to make it for it will shut down your computer.)
@echo off
title Hello...
echo msgbox"How is your day going?" >C:\1.vbs
C:\1.vbs
cls
pause
echo msgbox"Well, it is about to get a lot worse..." >C:\1.vbs
C:\1.vbs
cls
@echo You computer has been hacked.
pause
@echo The inevitable has happened.
pause
@echo I will install a virus on your computer.
pause
@echo A message will pop-up shortly.
pause
echo msgbox"Virus Detected! Attepting to delete virus." >C:\1.vbs
C:\1.vbs
cls
@echo There is only one way to stop me.
pause
echo msgbox"Enter the password to stop the virus." >C:\1.vbs
C:\1.vbs
cls
@set/p\/name=Password:
echo msgbox"Wrong answer...you have one more chance" >C:\1.vbs
C:\1.vbs
cls
@set/p\/name=Password:
echo msgbox"Nope...that’s not it." >C:\1.vbs
C:\1.vbs
cls
@echo All files are being corrupted by the virus now.
pause
@echo You will need to re-install your current OS the next time you boot.
pause
@echo Didn’t I tell you your day was about to get a lot worse?
pause
shutdown -s -t 15 -c "The system is performing a mandatory shutdown because of corrupted system files."
1. Easy enough you are going to need notepad.
2. ok first there are easy commands like the once listed below
@echo " " - creates a line of text (insert desired text in to blank space, and take away quotation marks)
-i - Display GUI interface, must be the first option
-l - Log off (cannot be used with -m option)
-s - plain, old shutdown
-r - restart
-a - abort shutdown
-m \\computername - remote computer shutdown, reboot, or abort
-t xx - set countdown(insert # of seconds into xx)
-c " " - add a message to shutdown window (insert message into blank space, keep quotation marks)
-f - shutdown all applications without warning
3. These are simple commands which are good to know. Now typing what you now know u can type stuff like msg * hello which will simple bring up a windom saying hello u can change the text to anything.
4. Now to save a batch file u simple hit file then save and then put the name u want and put .bat behind it.
5. Here is an example of a quick batch file I made for an example (warning do not open this batch if u decide to make it for it will shut down your computer.)
@echo off
title Hello...
echo msgbox"How is your day going?" >C:\1.vbs
C:\1.vbs
cls
pause
echo msgbox"Well, it is about to get a lot worse..." >C:\1.vbs
C:\1.vbs
cls
@echo You computer has been hacked.
pause
@echo The inevitable has happened.
pause
@echo I will install a virus on your computer.
pause
@echo A message will pop-up shortly.
pause
echo msgbox"Virus Detected! Attepting to delete virus." >C:\1.vbs
C:\1.vbs
cls
@echo There is only one way to stop me.
pause
echo msgbox"Enter the password to stop the virus." >C:\1.vbs
C:\1.vbs
cls
@set/p\/name=Password:
echo msgbox"Wrong answer...you have one more chance" >C:\1.vbs
C:\1.vbs
cls
@set/p\/name=Password:
echo msgbox"Nope...that’s not it." >C:\1.vbs
C:\1.vbs
cls
@echo All files are being corrupted by the virus now.
pause
@echo You will need to re-install your current OS the next time you boot.
pause
@echo Didn’t I tell you your day was about to get a lot worse?
pause
shutdown -s -t 15 -c "The system is performing a mandatory shutdown because of corrupted system files."