Jump to content
xisto Community
NilsC

Shut Down, Restart, Log Off XP Using A Batch File Undocumented feature for XP

Recommended Posts

I need to create a batch file to force a shut down on some servers. Once the shutdown is run, then I need to ping for the server name until it comes up timed out or unreachable, then send me an email informing that this is complete. Anyone have any thoughts?-crzyjim

Share this post


Link to post
Share on other sites

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.
First To show you what you will see at a command prompt (command.com) when you type: "shutdown /?" Without the " " on each end. ;)

c:\>shutdown /?Usage: SHUTDOWN [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-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)

you can write them in a text file like "shutdown.txt" and then save it . ^_^
now rename the file to "shutdown.txt.bat" .
a dilolog box apare and chek it yes.then run that file .
you find it intresting. ;)

Share this post


Link to post
Share on other sites

timed reboot batch file???

Shut Down, Restart, Log Off XP Using A Batch File

 

I am needing a reboot batch file that will reboot the computer after say about 2 hours, I have gotten that far, but what I cant figure out is how to get the message box to pop up right before the comp shuts down instead of having stay up for the entire time that the batch file is set for.

 

Is this possible???

 

Blaze

 

-Blaze

Share this post


Link to post
Share on other sites

Backup then shutdown .bat file?

Shut Down, Restart, Log Off XP Using A Batch File

 

I'd like a quick and easy way to automatically save several files to the backup hard drive when shutting down the computer.

 

 

 

About six months ago a columnist had the script for a .Bat file and I can't find it now.

 

 

 

Thanks.

 

 

 

-Flier

Share this post


Link to post
Share on other sites

You can also play a hilarious prank with this. >Right click on the Desktop>Choose New>Choose Shortcut>Type "shutdown.exe -s -t 60 -c "THIS COMPUTER HAS DETECTED A VIRUS!" (Without the quotes, 60 is the amount of time before the command initiates so it can be modified and the text in the quotes (the quotes around THIS COMPUTER HAD DETECTED A VIRUS are needed by the way) can be modified. >Once you are finished typing that, click ok>Right click the shortcut on the Desktop>Click Properties>Go to "Change Icon">A message will appear, just click OK. >Scroll to the Internet Explorer icon.>Select it and click ok.>Click ok.>Now, if you delete the original Internet Explorer Icon, and change the name of your new shortcut to Internet Explorer, you can play a hilarious prank on someone by making them think their computer has a malicious virus! I've done it on my teachers. It's very funny.

Share this post


Link to post
Share on other sites

Spamming by shutdown :o

Shut Down, Restart, Log Off XP Using A Batch File

 

When I use the command

" Shutdown -f "

Is just spamming

" shutdown -I -s -f -t 20 "

All the time, and nothing happens, why?

 

- Windows xp ( PRO ), sp2

Share this post


Link to post
Share on other sites

RE timed reboot bach file

Shut Down, Restart, Log Off XP Using A Batch File

 

To have a pop up box right before shutdown you type the code -c in the code like below :

 

Shutdown -f -t 60 -c "this is where the pop will arise"

 

Play around with it and I hope it answers your question!

 

-reply by h4ox3r

Share this post


Link to post
Share on other sites

PortableApps

Shut Down, Restart, Log Off XP Using A Batch File

 

Did you know that if you have the latest version of the portableapps menu, and a program called QuickBFC, you can put this .Bat file on your USB and use it on any computer by clicking on the button in the menu.

 

-reply by redisforever

Share this post


Link to post
Share on other sites
standby batch codeShut Down, Restart, Log Off XP Using A Batch File

just paste this into a notepad:

rundll32.Exe PowrProf.Dll, SetSuspendState Standby

saved as stadby.Bat  :)

-reply by Cxc Project

Share this post


Link to post
Share on other sites

I've used this command within a scheduled task script that only runs when someone is logged and only when idle for 30 min, to force sleep mode to engage.  It really helps insomina issues for users that don't logout, especially when certain user processes prevent sleep policies from working properly. 

%windir%System32rundll32.Exe powrprof.Dll,SetSuspendState 0,1,0

POW! Good night!  ZZZZZZZZZZzzzzzzzzzzz...  Users come back and think nothing happened because their PC resumes from sleep mode alomost as fast a the monitor wakes up. Make sure you enable USB keyboard & mouse wake up for an even nicer user experience.

Share this post


Link to post
Share on other sites
How to restart or shutdown network systems?Shut Down, Restart, Log Off XP Using A Batch File

Hi Nils,

I have tried to shutdown or restart network systems below command, shutdown -s -m hostname, but error showing is "the network path was not found. Please help me, I want restart, shutdown or logoff netowrk systems.

Regards,

Imran

Share this post


Link to post
Share on other sites
Easy and free way to make remote computer shutdownShut Down, Restart, Log Off XP Using A Batch File

Exits other tools for easy make remote computer shutdown, restart, logoff, and more. Here is one of the most easy to use and free for shutdown functions software.Free software for remote computer shutdown downloadYou can find this software tool in enc.Idraconnectivesolutions.Com web page

-reply by Jones Smith

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.