Force Smart Card Removal to Lock Workstation
Configuring Windows to automatically lock your workstation when a
smart card is removed adds a critical layer of physical security to your
environment. This guide explains how to enforce this behavior by
modifying the Windows Registry using the Registry Editor
(regedit), as well as configuring the prerequisite
background service required for the policy to take effect.
Step 1: Enable the Smart Card Removal Policy Service
For the registry setting to function, the underlying Windows service must be running and set to start automatically.
- Press
Win + R, typeservices.msc, and press Enter. - Scroll down to locate Smart Card Removal Policy
(Service name:
SCPolicySvc). - Double-click the service to open its properties.
- Change the Startup type to Automatic.
- If the service is not running, click Start.
- Click Apply and OK.
Step 2: Configure the Registry Setting
Press
Win + R, typeregedit, and press Enter to open the Registry Editor.Navigate to the following path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinlogonIn the right pane, look for a String value named
ScRemoveOption.- If it does not exist, right-click on an empty space, select
New > String Value, and name it
ScRemoveOption.
- If it does not exist, right-click on an empty space, select
New > String Value, and name it
Double-click
ScRemoveOptionand set its Value data to1.
Registry Option Reference:
0= No Action (Default)1= Lock Workstation2= Force Logoff3= Disconnect Remote Desktop Session
- Click OK to save the changes.
- Close the Registry Editor.
Step 3: Apply and Test the Changes
- Restart your computer or log out and log back in to apply the changes.
- Insert your smart card and log into Windows.
- Remove the smart card; the workstation should immediately transition to the lock screen.