Before the customer asked us to be able to log in with a designated account in the Windows login interface, and then use the Windows credentials provider (Vista above, XP needs to use Gina) to achieve this feature, during this period encountered some problems:
If the user joins the domain, and then re-enter the login interface, you need to press the security sequence that is, Alt Contrl Delete, this because the comparison has not been successful simulation, the use of the registry method, disable the security sequence, this method is not perfect, because each time you rejoin the domain, The key value corresponding to the registry is overridden and is set to the default, which is the need to enter a safe sequence. After the customer asked that the SAS can not be disabled, there is no way to find other ways. Researched the code under VNC and found it was using API Sendsas
Implementation, before also found this API, did not carefully read the document, has not been successful test, the back of the original is to be signed , it seems to be careful to read the document. Another thing is to modify the Group Policy so that its services or programs can emulate SAS (see MSDN). The code is simple.
Hmodule hmodule=loadlibrary (L"sas.dll"); Sendsas s= (Sendsas) GetProcAddress (hmodule,"sendsas"); if (s) { s (true)//(or FALSE); }
Enable SAS
1Windows Registry Editor Version5.002 3 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]4 "DisableCAD"=dword:000000005 6 [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]7 "DisableCAD"=-8 9 [Hkey_local_machine\software\microsoft\windows\currentversion\policies\system]Ten "DisableCAD"=- One A [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System] - "DisableCAD"=-
disabling SAS
1Windows Registry Editor Version5.002 3 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]4 "DisableCAD"=dword:000000015 6 [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]7 "DisableCAD"=-8 9 [Hkey_local_machine\software\microsoft\windows\currentversion\policies\system]Ten "DisableCAD"=- One A [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System] - "DisableCAD"=-
Refer to MSDN Sendsas instructions
https://msdn.microsoft.com/en-us/library/windows/desktop/dd979761 (v=vs.85). aspx
An article on the CSDN
http://blog.csdn.net/chenyujing1234/article/details/8286492
Simulate Alt Ctrl + Delete above Windows Vista