thanks for the tutorials! the hibernation one was good to know. the shutdown one, however, misses the point of my inquery. I was wondering if Windows logs off before shutting down? The script I wrote disables a USB audio interface I have (because it's drivers aren't working too well in windows 7 whenever my computer sleeps or shuts down) when the computer logs off. This would be pointless, though, if Windows doesn't log off at shutdown...