Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use this command in autoit to turn off my laptop, if a timer runs out

Run(@SystemDir & "\shutdown.exe /f /s /t 10", "", @SW_MAXIMIZE)  

It works fine most of the time, but occasionally I get the BlueScreen when turning the computer on, usually before the log on screen and after the Windows logo animation completes. Is this because of turning off the computer directly using the shutdown command, or can there be other issues? I should point out that when ever my autoit script shuts off the computer, usually there are multiple browsers with multiple tabs open, along with other applications running. So I want to know,

What is the difference between shutting off the computer through the start menu, by directly pressing the power button, and by issuing the shutdown command from the autoit script? Is abruptly shutting down the computer using the shutdown command while other user applications are running dangerous in any way?

My OS is Windows 7 and computer is a laptop

share|improve this question
    
I find it personally unlikely that using shutdown.exe (which is a tool MS provides for exactly the purpose of shutting down the system from scripts or command line) would perform the shutdown any less cleanly for the OS than using the shutdown functionality of the GUI. For the applications forcing a shut down is of course a different thing as they are not probably closed as gracefully as with the GUI alternative but that should be no reason for BSOD. –  zagrimsan Aug 18 '13 at 10:33
1  
If you want the BSOD part of the question to be analysed any deeper, you need to provide at least the error code and error technical details parts of the screen as referred to in this page. –  zagrimsan Aug 18 '13 at 10:41
    
does that code get saved anywhere for the last BSOD? I just ignored it and restarted Windows normally. Is it saved anywhere in a log? –  user13267 Aug 18 '13 at 10:47
    
ok I think I've found the dmp file that has this information, but I can't read, opening it in notepad only gives some glyphs –  user13267 Aug 18 '13 at 10:52
    
I'd assume you should be able to find something about the BSODs from the system event log. Open Event Viewer and browse the System log there. The dump file is binary so it's no use trying to view it in a text editor, one could use a debugger to read it but I can't help you with that as I've never done it myself, either (although googling might give you some clues). –  zagrimsan Aug 18 '13 at 15:19

2 Answers 2

To answer the question:

The shutdown command is what your computer runs when you press the power button (if you have shutdown assigned it), or by shutting down through the start menu. The command is provided by Microsoft, and therefore shouldn't cause a BSOD, especially in your case where the BSOD is happening at startup.

Using the /f and/or /t 0 options wouldn't cause hardware problems either, it would only cause applications problems if that (applications not shutting down properly, unsaved work, etc).

In your case:

You would have to post the contents of your crash dump in order for anyone to determine what is actually causing the BSOD. Many times it's related to peripherals/drivers, but it could be anything.

As suggested in comments, you could see if anything is in the Event Log, but since your BSOD is happening before Windows has booted, there's a lower chance you'll find what's actually causing it. The crash dump will be a much more reliable source.

share|improve this answer
    
I think I have found where the crash dump file is; is there any software that parses it to get the BSOD message back from the crash dump? –  user13267 Aug 19 '13 at 11:02
/f         Force running applications to close without forewarning users.
       The /f parameter is implied when a value greater than 0 is
       specified for the /t parameter.

So unless you do /t 0 without f this is endtasking everything (it can't close) it appears.

It does shut down the computer rather than just doing what pulling the power cable out would do.

I couldn't tell you there is any other factors (autoit even) but I haven't had a blue screen from the command myself.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.