Launch regedit to access the registry editor.
Search for the following Registry Key:
HKEY_CURRENT_USER\Control Panel\Desktop
Create a new string value named AutoEndTasks and set its value to 1.
This should prevent Windows from gracefully shutting down and will automatically terminate running process.
For something more granular:
- Search for the following Registry Key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
- Edit the WaitToKillServiceTimeout value.
For active user programs such as Word, which asks if you like to quit without saving etc.
- Search for the following Registry Key:
HKEY_CURRENT_USER\ControlPanel\Desktop
- Create two Reg_SZ values Key - HungAppTimeout and WaitToKillAppTimeout
- Modify their value as required, WaitToKillAppTimeout represents the window of time in which a application need to respond before fordibly being killed. HungAppTimeout specifies the window of time to allow for an app to exit before being deemed unresponsive.
Full article detailing the process here.