Dunno about anyone else but i've been trying to find a way of shutting down or restarting the computer using QBASIC. To put it simply, I found a way and it works. I found something on the AOL welcome screen; "ways to make your computer better". Usually AOL put these things out for people who have rubbish computers and are so thick they don't know how to use them. Being as board as I was, I decided to take a look and I found something which apparently makes your computer shut down more quickly. They suggested starting shutdown.exe in C:Windowssystem32.
this werent good enough so I found a link to the computer advisor mag's website were there was tones of syntax n' stuff. I fiddled around a bit in QBASIC and come up with this:
SHELL "CHDIR C:WindowsSystem32"
SHELL "Shutdown.exe -s -f -t 00"
the s is to shut down, replace it with r to restart. the f is for forced shutdown, use this if you want to close any running programs without asking. the t is for a time delay, use 00 to shutdown immediately. note that even by entering a 0 time delay, it will still take about 20 seconds for the shut down to take effect.
To see some more syntax for this useful command, run shutdown.exe with no parameters and a window will display all the possible functions with the right syntax.
I know you didn't ask for it but I hope this helps
Mr Keebs