I'm a newbie in writing credential provider, so could someone help me to find out how to catch the Smart Card Removal event on windows vista+, programming language C++. I need to lock machine on that event.
Credential Provider Vista+ Smart Card removal event
281 views Asked by Yermek Makulbek At
1
Came across your question while searching for a different thing so just a quick response.
The following settings should allow locking your workstation upon removal of the smart card on the following operating systems: Windows Vista, Windows 7, Windows 8, Windows Server 2008, Windows Server 2008 R2 and WIndows Server 2012
Setting 1: Run "gpedit.msc" as an administrator. Navigate to this option group: Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options Set "Interactive logon: Smart card removal behavior" to "Lock Workstation".
Setting 2: Run "services" as an administrator Right click on "Smart Card Removal Policy", and click property. Set "Startup type" to "Automatic (delayed)".
Source: https://www.farbeyondcode.com/How-to-lock-Windows-immediately-upon-smart-card-removal-5-2999.html