Automated Shutdown: Questions and Answers

  • Thread starter Thread starter Pengwuino
  • Start date Start date
  • Tags Tags
    Automated
AI Thread Summary
Automated shutdowns can be configured using the task scheduler to initiate shutdown.exe at a specified time, but it requires the correct parameters to function properly. If Microsoft Word has an unsaved file open, the shutdown may proceed without saving unless auto-save is enabled. For remote waking of computers, Wake-On-LAN capability is necessary, and software can be used to send the required magic packets. Some users have reported issues with shutdown commands not executing as intended, suggesting the need for proper command syntax. Overall, discussions highlight the importance of correct configurations for both automated shutdowns and remote wake functionalities.
Pengwuino
Gold Member
Messages
5,112
Reaction score
20
Ok so I wanted to help save energy by having the computers in my house shutdown after 11:59pm on a daily basis. I used the task scheduler and had the shutdown.exe initiate at that time if the computer is idle for over 15 minutes at the time and attempt for the next 60 minutes if its not. Now, I have some questions.

If say, Microsoft Word is open and there's an unsaved file just sitting there at 11:59, what will happen? Will it shutdown without saving or will it refuse to shutdown (the computer) or what? :)

Also, a bit off topic but is there a way to remote-wake a computer over a wireless LAN?
 
Computer science news on Phys.org
I think Word has an auto-save feature which saves the file every so often (you may have to enable this). Other than that i don't know if it will save at shutdown, but this is something you can easily test.
For remote wake, if your network card has Wake-On-Lan, then you can use some software to turn it on remotely.
I found this one: http://www.matcode.com/wol.htm
You'll need the MAC address of the computer you want to turn on. The best way to get it is to go to that computer, go to run, type "cmd", at the command prompt type "ipconfig /all", the MAC address is displayed under physical address. I don't know if every network card comes with WOL by default though, but they seem to go pretty cheap (i saw one for $11) so you may have one. You can easily do this over the internet also (if the PC you want to remote start is not behind a router, or unless the router can forward the so called "magic packets" that are used for WOL).
Actually, i think that even if you're behind a router it may work, since the program allows you to specify, besides the MAC address, (optionally) an IP address as well.
 
Last edited:
Someone once told me however that 802.11g cards are not capable of having WOL capabilities put on them...
 
An easy way to find out is to right-click on My Computer, then under the "Hardware" tab click "Device Manager", in the snapin that comes up under "Network Adapters" double click on your network card. Finally select the "Advanced" tab, if in the Properties box there is a "Wake on Settings" or somthing like that, then you know you have it. I'm glad to find out that i have it in my Intel PRO/1000 MTW Network Card.
 
Damn this automated shutdownt hing didn't work! The task looked perfect, 11:59 came with at least an hour of idle time before it and... nothing... nothing happened...
 
I found out what's probably causing it to not shutdown. Shutdown.exe only works if you pass it the appropriate parameters (l for logoff, s to shut down and r to restart). You can try double clicking on it and you'll see nothing happens. All you need to do is right-click on the task you've created, then in the window that comes up, under run, make sure you have -r after shutdown.exe, for example:
C:\WINDOWS\system32\shutdown.exe -r

I tried this and it works.
 
I want it to shutdown and it doesn't work :( I trid -s and nothing :(
 
Try the following, right click on your desktop, select New -> Shortcut. In the location type C:\WINDOWS\system32\shutdown.exe -l
Once you're finished with the shortcut double click on it and see if you log off.
 
Yah i tried that and it worked... i suppose i can just point the task to that shortcut but i wanted it to be kinda compact and smart and not having ot just gerryrig some sort of solution.
 
  • #10
I don't think pointing the task to the shortcut will work any more than pointing to the program, because when you select the shortcut it actually selects the target program. Did you right-click on your task and added the -s? That worked for me.
 
  • #11
A cool thing, you can have a countdown and a message displayed as well, this only works for shutdown or restart. Use:
C:\WINDOWS\system32\shutdown.exe -s -t 10 -c "T minus 10 seconds to shutdown"

Then you can make a shortcut to abort shudown with:
C:\WINDOWS\system32\shutdown.exe -a

This way you give the user an option to prevent shutdown. Pretty cool.
 
Last edited:
  • #12
Is it Best to Leave Desktops Always On/Standby/Hibernate?

I read with interest Penguino's plans to have his PC shutdown at midnight, but is better or not for the longevity and total functionlity of the PC to always leave it on?

I used to in earlier years leave my PC on 24/7. In consideration of wearing out parts, HDs, fans, etc. I have since turned off my PC after daily use.

But, in light of HP desktop "bios" conflict with HP printers and accessories that destroyed my PCs hal.dll file and required a complete reformat and set-up - I ask if placing it in STANDBY or HIBERNATE when NOT in active use permits a longer useful life, and fewer operational problems? Given also how Windows and critical PC bios and other OS files are put under more work during START-UP.

What is the expert view of power-up/operating today's PCs?
 
  • #13
Pengwuino said:
I want it to shutdown and it doesn't work :( I trid -s and nothing :(

The annoying thing about Windows is that even if you *ask* it to shut down, it still won't work on occasion :rolleyes:. I've had limited success with the download manager GetRight's auto-shutdown feature.

There might be some workable freeware auto-shutdown software on the net (just in case if Microsoft standard is not working properly), such as this when I just googled it: http://www.konradp.com/products/auto_shutdown/
 
  • #14
Code:
Z:\>shutdown /?
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-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 wa
ning
        -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 l
ss than 256)
                                yy is the minor reason code (positive integer l
ss than 65536)

Z:\>
C:\WINDOWS\system32\shutdown.exe -r
-r will reboot.

Just create a .cmd file with the following text:

@echo off
shutdown -s -01
end

Then create a schedualed task to do it at 23:59

If your 802.11 INT can handle magic packets then you can Wake on LAN..

[edit] Thinking about this, I think your right Mr Penguin, I highly doubt you could wake on LAN through a Wireless NIC. I have a hard enough time getting that to work through VLANS[/edit]
 
Last edited:

Similar threads

Replies
1
Views
10K
Back
Top