This is a copy of a tutorial I created for astahost.com. I'm copying it here as a courtesy to Tech Recipe members. QUOTE How to shutdown a XP Pro computer when you are connected using RDC (Remote Desktop Connection) using a batch file or RPC (Remote Procedure Command) This is useful if you can't get to the computer but have remote access to the computer via a network or the internet. CODE c:\>shutdown /? CODE shutdown -s CODE shutdown -r CODE shutdown -f CODE shutdown -l CODE shutdown -s -m \\computername and this last one is fun in an enviroment using RPC
First To show you what you will see at a command prompt (command.com) when you type: "shutdown /?" Without the " " on each end.
Usage: SHUTDOWN [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]
No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [u][p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)
This is an undocumented feature in XP so I have not found any writeup about it on M$ and everything used here is from other sources. Do not use "cmd" to start the command interpreter (cmd.exe), but type "command" for (command.com. Now you can shutdown the computer by typing "shutdown -s" or to restart the computer type "shutdown -r"
To create a batch file for this you can use notepad, and save the file as .bat in c:\ (root directory) Here are the 3 most used batch files for shutdown:
1 save as down.bat
2 save as restart.bat
3 save as forcedown.bat
4 save as logoff.bat
5 save as rpcdown.bat (replace computername with the name of your computer )
So that's a piece of cake, the other options are self explanatory and if you need any help creating the batch file, ask and someone will help
This is from astahost tutorial I made http://www.astahost.com/index.php?showtopic=3715&
Nils
Friday, September 5, 2008
Shut Down, Restart, Log Off Xp Using A Batch File - Undocumented feature for XP
·
Labels: Tips 'n' Tricks
Subscribe to:
Post Comments (Atom)
Check out my new blog:
Translation
Recent Posts
Who's Online?
Pageviews Today
About Me
嗨,我是花,居住在印度兴奋的Windows,Linux中国的外籍人士和所有高科技的东西
Receive updates for free
Labels
- Tips 'n' Tricks (171)
- Windows Vista (105)
- Website/ Blogging (91)
- General (88)
- Windows XP (84)
- Internet (59)
- Windows 7 (54)
- Software (43)
- Mobile-Tips and Tricks (35)
- Review (28)
- Security (28)
- SEO Tools (25)
- iPhone (17)
- Linux (14)
- Windows Mobile (14)
- mac (13)
- Mobile (12)
- MS Office (7)
- Hardware (6)
- Windows 98 (6)
- Zune (6)
- Games (4)
- Mobile Reviews (3)
- Disclaimer (2)
Blog Archive
- June (2)
- May (2)
- August (2)
- July (1)
- June (1)
- May (2)
- April (4)
- March (4)
- February (1)
- December (2)
- November (1)
- November (1)
- June (2)
- May (28)
- April (54)
- March (83)
- February (60)
- January (57)
- December (48)
- November (17)
- October (28)
- September (22)
- August (19)
- July (34)
- June (59)
- May (1)
- April (5)
- March (22)
- February (5)
- January (31)
0 comments:
Post a Comment