FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


A little lesson On Batch





Ryansindustries
Q: What is batch
A: Batch is a programing language that is used with only the use of notepad.

Q: How can I make a batch file
A: When you save your file in notepad name is whateveryouwant.bat

1. Okay so I'm going to give one quick sample program that you may find a bit useful to prank your friends. Open notepad and type

shutdown -f -r -c " Type a message here like you got owned or something"

2.Break it down
Shutdown tell the computer the action.
- f tells the computer to force all aplications to close with no warning
- r tell shte computer to restart
- c means comment

Shutdown -f -r -c "You got owned by www.ryansindustries.co.nr "

After you have that typed into notepad save it as like Restart.bat and itll save as a batch file. When you open that file itll restart your computer with the message you typed into the quotation marks "". Zip that file and sent it off and have a little laugh.

-Ryan at www.ryansindustries.co.nr
hexkid
Ryansindustries wrote:
Q: What is batch
A: Batch is a programing language that is used with only the use of notepad.
[...]
Shutdown -f -r -c "You got owned by www.ryansindustries.co.nr "


Hey! You're mixing Windows and Linux in the same basket. Don't do that Smile

Anyway, when, in Linux, I try (note the lowercase s in shutdown)
Code:
shutdown -f -r -c "message"
I get
Code:
bash: shutdown: command not found


If I try it in Windows I get
Code:
'shutdown' is not recognized as an internal or external command,
operable program or batch file.
muggle
It depends on the version of Windows you’re using. The shutdown command exists natively in XP (http://www.ss64.com/nt/shutdown.html); to use it on Win 2000 you have to install the Resource Kit.
TomS
I thought you wanna teach us programming batch.
But you only showed us one single command Sad
What about a little prog, that asks the user some questions, creates outputs on screen and in a file?
hexkid
muggle wrote:
It depends on the version of Windows you’re using. The shutdown command exists natively in XP (http://www.ss64.com/nt/shutdown.html); to use it on Win 2000 you have to install the Resource Kit.


Oops. I stand corrected, thank you.
Ryan, please accept my apologies.
Related topics
One More Question (About Points and FRIH$)
Little Johny
Do this little to protect your MS Windows.
A few good jokes
[OFFICIAL] What are you currently reading?
SQL Basics
hi ive got a question
Trying to Learn German
batch processing softwares for webpages construction
The Left Wing Blues
mp3 and mp4
Christianity: Why does God ask for kindness to others?
Babies Education
A sweet lesson on patience. -- Aaron Manley Smith
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.