Problem:

"This computer is in use and has been locked. Only domain\user (user) or an administrator can unlock this computer."
Sound familiar? This message can be frustrating. The problem is that windows users at work may lock workstations shared by other employees and forget to unlock them before they leave.
One workaround is to unplug the computer and turn it back on. However, this leads to file corruption and is highly censurable. The solution is the AlexsApps Workstation Unlocker. This program runs alongside the "Unlock Computer" dialog box and allows even non-administrators to log off the user that locked the computer, thus unlocking the workstation.
Notes:
--- This program works on both XP and Vista. Sadly, there is no point in using this program with Vista because Vista computers allow fast user switching even when joined to a domain.
--- When the countdown is over two minutes, the time is displayed in minutes. Otherwise, it is displayed in seconds. The times are always rounded down to the nearest minute or second.
--- The user's idle time is subtracted from the default countdown when the computer is locked. This is only noticeable when the computer locks itself automatically when the user is idle without using a screensaver.
Settings
Change settings in the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\WorkstationUnlocker
| Value | Description |
| SecondsDefault | Default Value: 240. (4 minutes). The number of seconds from which to count down when a user locks the computer. |
| SecondsDefaultAdmin | Default Value: 600. (10 minutes). If OptionAdminExtraTime=1, The number of seconds from which to count down when an administrator locks the computer. |
| SecondsMax | Default Value: 1200. If OptionAdditionalTime=1, the number of seconds from which to count down when a user selects "Max available time" from the Additional Time dialog box. |
| SecondsMaxAdmin | Default Value: 2000000000. If OptionAdditionalTime=1 AND OptionAdminExtraTime=1, the number of seconds from which to count down when an administrator selects "Max available time" from the Additional Time dialog box. |
| OptionAdminExtraTime | Default Value: 1. If 0, values SecondsDefaultAdmin and SecondsMaxAdmin will be ignored. Administrators will have the same countdowns as users. If 1, administrators will have presumably higher countdowns specified by the SecondsDefaultAdmin and SecondsMaxAdmin values. |
| OptionAdditionalTime | Default Value: 1. If 1, enables the Additional Time button. If 0, the Additional Time button is disabled. |
| OptionLogoff | Default Value: 1. If 1, enables the Logoff button. If 0, the Logoff button is disabled. Only disable the Logoff button if you enable the Disconnect button. Disabling the Logoff button will protect users from being forcefully logged off and losing data. |
| OptionDisconnect | Default Value: 0. If 1, enables the Disconnect ("Switch Users") button. If 1, the Disconnect button is disabled. Only disable the Disconnect button if you enable the Logoff button. Disabling the Disconnect button will help free system resources. Allowing multiple users to be logged on at the same time may exhaust RAM. The Disconnect button disconnects the user from its terminal services session. For the Disconnect button to work on Windows XP, the AllowMultipleTSSessions registry value must be set to 1. Windows XP computers set this value to 0 upon every reboot if the computer is joined to a domain. Versions 1.1.7.0 and higher of Workstation Unlocker set this value to 1 automatically every time the Switch Users button is clicked. |
| OptionDisconnectWaitForCountdown | Default Value: 1. Applies only if OptionDisconnect=1. If OptionDisconnectWaitForCountdown=1, the Disconnect button will not be enabled until the countdown reaches 0. If OptionDisconnectWaitForCountdown=0, the Disconnect button will be available immediately. The Logoff button, if OptionEnableLogoff=1, will still be disabled until the countdown reaches 0. |
| OptionShowComputerName | Default Value: 1. If 1, the computer name is displayed at the top of the Workstation Unlocker Window. |
| Sha1PwdAnytimeLogoff | The SHA1 hash of the password required to log off users before the countdown reaches 0. Press F9 to enter this password. The default password cannot be found here. |
| Sha1PwdInfiniteTime | The SHA1 hash of the password required to deactivate the Workstation Unlocker via the "Infinite Time" option in the Additional Time dialog box. The default password cannot be found here. |
Screenshots

User Alex Taylor locked the computer named Jennifer.

Additional Time dialog box. Reset Time - Countdown reset to default seconds value specified in registry. Max available time - sets countdown to maximum time value specified in registry. Infinite time (password set in registry in SHA1 format) - deactivates Workstation Unlocker.

After Infinite time option is selected in Additional Time dialog box, this message is displayed.

When the countdown reaches 0, this message is displayed and the computer may be used by anyone.

You can choose to enable the Disconnect ("Switch Users") button as well as the Logoff button.

The countdown does not need to reach 0 before the Disconnect button is enabled if you change the OptionDisconnectWaitForCountdown registry value to 0.

The computer name can be hidden, and the Additional Time button can be disabled.