»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 01-28-2004, 02:52 PM   #1 (permalink)
Registered User
 
ArcticFox's Avatar
 
Join Date: Jan 2003
Location: Wilsonville, OR
Posts: 2,220
ArcticFox is on a distinguished road
Send a message via AIM to ArcticFox Send a message via MSN to ArcticFox Send a message via Yahoo to ArcticFox Send a message via Skype™ to ArcticFox
How to I write a batch file to shutdown/reboot?

What are the commands that I need to put into a batch file in order to get it to shut down my PC? Or how about rebooting it?

Also, is there a site that has other stuff you can do with batch files?

ArcticFox is offline   Reply With Quote
Old 01-28-2004, 02:56 PM   #2 (permalink)
Registered User
 
VHockey86's Avatar
 
Join Date: Jan 2003
Location: New York
Posts: 1,588
VHockey86 is on a distinguished road
"ShutdownAllows you to shut down or restart a local or remote computer. Used without parameters, shutdown will logoff the current user.

Syntax
shutdown [{-l|-s|-r|-a}] [-f] [-m [\\ComputerName]] [-t xx] [-c "message"] [-d[u][p]:xx:yy]

Parameters
-l
Logs off the current user, this is also the defualt. -m ComputerName takes precedence.
-s
Shuts down the local computer.
-r
Reboots after shutdown.
-a
Aborts shutdown. Ignores other parameters, except -l and ComputerName. You can only use -a during the time-out period.
-f
Forces running applications to close.
-m [\\ComputerName]
Specifies the computer that you want to shut down.
-t xx
Sets the timer for system shutdown in xx seconds. The default is 20 seconds.
-c "message"
Specifies a message to be displayed in the Message area of the System Shutdown window. You can use a maximum of 127 characters. You must enclose the message in quotation marks.
-d [u][p]:xx:yy
Lists the reason code for the shutdown. The following table lists the different values. Value Description
u Indicates a user code.
p Indicates a planned shutdown code.
xx Specifies the major reason code (0-255).
yy Specifies the minor reason code (0-65536).
"
VHockey86 is offline   Reply With Quote
Old 01-28-2004, 02:57 PM   #3 (permalink)
Guest
Guest
 
Posts: n/a
http://www.computerhope.com/batch.htm

http://gatsby.tafe.tas.edu.au/batch/

search google, there is billions of sites to help with your batch file needs
  Reply With Quote
Old 01-28-2004, 03:24 PM   #4 (permalink)
Registered User
 
ArcticFox's Avatar
 
Join Date: Jan 2003
Location: Wilsonville, OR
Posts: 2,220
ArcticFox is on a distinguished road
Send a message via AIM to ArcticFox Send a message via MSN to ArcticFox Send a message via Yahoo to ArcticFox Send a message via Skype™ to ArcticFox
Cool, but a fellow hacker gave me these snippets of code:

For 95/98/ME:
START C:\windows\rundll.exe user.exe,exitwindowsexec

For XP:
shutdown -r -c "Hahahah you got pwned by da Fox! Sucka!"

The one for XP should be the same for 2000, maybe not though.
Although, I am obligated to give points to VHockey for his nicely-sized tutorial on the subject.
ArcticFox is offline   Reply With Quote
Old 01-28-2004, 03:37 PM   #5 (permalink)
Registered User
 
VHockey86's Avatar
 
Join Date: Jan 2003
Location: New York
Posts: 1,588
VHockey86 is on a distinguished road
dont thank me, I just cut and paste it from windows help/support page lol.
VHockey86 is offline   Reply With Quote
Old 01-29-2004, 09:26 AM   #6 (permalink)
HKS
Registered User
 
Join Date: Oct 2001
Posts: 93
HKS is on a distinguished road
you can also schedule it

here is the kb article for xp:

http://support.microsoft.com/default...&Product=winxp
HKS is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 01:21 PM.