Here are the parameters availables (in XP and Vista)
Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "shutdown -r -t 5", 1, False
I wonder if this code would still work on W8. It's supposed to launch a shut down dialog.
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)
Starting a Desktop-only application (in fatc any normal Windows software, eg Notepad) should open the Desktop automaticaly. (at default of find the right Desktop app, which may not exist as a launchable application other than from Metro) The problem is that you would have this app open everytime.... Maybe launching wait.exe (a program that does just nothing) could perhaps open the desktop too without opening any useless window. As soon as I can iinstall W8 (perhaps this week) I'll do these kind of tests. But I never did launch scripts so far.
Originally Posted by Jimbo