How can I automatically kill hung processes when I logoff?

John Savill

May 6, 1999

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. When you tell NT to shut down, it first sends shutdown requests toany running processes. Most 32-bit applications honour these requests and shutdown, but older 16-bit apps running in the Virtual DOS Machine often won't.When this occurs, the operating system prompts you with a dialog box asking ifyou want to kill the task, wait for the task to die on its own, or cancel theshutdown. By modifying the Registry, you can automate this process.

You can force NT to kill all running processes on shutdown by performing thefollowing:

  1. Start the registry editor (regedit.exe)

  2. Move to HKEY_CURRENT_USERControl PanelDesktop

  3. If a value "AutoEndTasks" does not exist from the Edit menuselect New - String Value. Enter a name of AutoEndTasks and press Enter

  4. Double click on AutoEndTasks and set to 1. Click OK

  5. Close the registry editor

You can also add this key to HKEY_USERS.DEFAULTControl PanelDesktop fornew users to inherit.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like