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.

When I go to reboot my laptop (one that I access remotely often), a lot of the time it will hang and a process will completely prevent it from shutting down or rebooting. Is there any registry hack or anything that I can throw on my Windows 7 system that will force those programs to close?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

You can create a command script like this..

@echo off
shutdown -f -s -t 0

And save this script on desktop with the name of shutdown.cmd. And this will shutdown your PC immediate.

And if you are using it remotely then you can try the command

Shutdown -f -s -m \\ComputerName

Or you can set the time to shutdown your remote PC too...

Shutdown -f -s -m -t 0 \\ComputerName

Replace the -s with -r to restart the PC.

Replace the 0 with your time limit. For more information see this article. You also see create shortcut for shutdown.

share|improve this answer
1  
Instead if creating a batch for, just create a new shortcut with the shutdown command. You can also get rid of the black flash, and choose an icon easier –  Canadian Luke May 27 '12 at 1:43
    
@Luke good idea to get rid of from black flash. :) –  avirk May 27 '12 at 1:48

Registry setting to auto-end tasks at shutdown: Type regedit in run command and navigate to following path

HKEY_CURRENT_USER > Control Panel > Desktop > create string key called AutoEndTasks > set value to 1

WARNING: this will always shut down Windows, even if an application is open with unsaved changes.

share|improve this answer
1  
This solution doesn't work! –  nikhil Jul 9 '12 at 8:29
    
Since you are not the original poster, your issue should be submitted as a new question, with a link to this question, saying something like "I tried that suggestion, but it didn't work", and explain what did or didn't happen. You can check if the Registry key was setup correctly with this DOS command: reg query "HKCU\Control Panel\Desktop" /v AutoEndTasks –  Tom Jul 9 '12 at 13:43
    
I had the exact same question and found this thread so I though better not to post a duplicate. That command shows the value to be set as 1. –  nikhil Jul 9 '12 at 16:26
    
Is the 2nd column REG_SZ? –  Tom Jul 13 '12 at 12:19
1  
The following page suggests some additional registry settings that might help. It even has a .reg file that you can download and run to make those changes for you. sparkmylife.com/… –  Tom Jul 15 '12 at 0:33

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.