I'm trying to write a batch file to automate a log off, but if I use the /t switch the command prompt will print the Usage (i.e. as if I typed "shutdown" or "shutdown /?" into the command prompt) and then quit without initiating a log off. I have confirmed
this by typing the line "shutdown /a" into the command prompt after attempting a shutdown with the /t switch (I've tried both 0 and 1), which results in the message "Unable to abort the system shutdown because no shutdown was in progress.(1116)"
I can use the line "shutdown /l" and it will work just fine, but when I log back on I notice that any new or moved icons will be in the upper-left corner of the desktop (i.e. not where I put them).
I have also noticed that the Usage (shutdown /?) explains that if the /t switch is not set (I'm assuming this, as the literal text reads "..., with a default of 30.") the log off will be initiated, but not executed until 30 seconds after the shutdown command
is resolved. Yet, if I simply use "shutdown /l" the current user is logged off immediately.