weird shutdown.exe behavior
If you are not familiar with shutdown.exe, it is a command line exe that you can use to shutdown a windows system.
If you run it from the command line with no params, it gives you the help screen to show you what params you can use.
However there is one param, -t that is for specifying a time to shutdown.
It says the syntax should be
shutdown -t xx (where xx is number of seconds until shutdown occurs)
However, when I run shutdown with -t 30, all it does is log off the user profile instantly. No time wait, no shutdown or reboot, just logs off windows.
This happened on 2 of the machines I tested on.
Anyone have any thoughts? It isn't a blocking issue or anything for me, just thought it was odd.
Re: weird shutdown.exe behavior
Shouldnt the syntax be...
shutdown.exe /t:xx
(no space)
Re: weird shutdown.exe behavior
I will assume you did a google search and found the MSDN document about Windows 2000 (as I did) with regards to shutdown.exe and its switches.
However if you go to a command line in WinXP and type
shutdown.exe /t:10
it does nothing at all.
Also if you go to a command prompt and just type shutdown and hit enter, you get the switch help, which indicates there is a space and no colon between the switch and its value.
Re: weird shutdown.exe behavior
Rob, I think I figured out, that the t switch only works when you specify -s (shutdown) or -r (restart). There may be a few other combinations that will also work with it, I guess you just need to specify the type of shutdown.
I just still think it is weird that if you do a /t xx by itself not long defaults to just log you off, it also does not count down, it does it immediatly, as if you had specified 0 seconds.
A line like this does work to shutdown after a minute
shutdown -s -t 60
Re: weird shutdown.exe behavior
Yea.
But without the s or r then why should it display anything as it doesnt know what you are wanting to do. I thought you had specified that too as I assumed :embarassed:
Re: weird shutdown.exe behavior
I can accept that you need to have a -s or -r or -l qualifier when also specifying time. You need to indicate WHAT type of shutdown you want to do, and perhaps a time delay before it happens.
What I just don't get is why when you try to use the time delay without the shutdown type, it defaults to log off the profile, and with no time delay.
Re: weird shutdown.exe behavior
Probably by desige or as a "feature". its safer to have it log off then to have it shutdown by default.