Installing a Custom GINA

Recently, we've had some questions about how to install a 3rd party GINA as an Install Software step during an OSD Task Sequence.  The best solution is to install the GINA in the reference image outside of OSD.  However, if this is not possible and the GINA must be installed during the Task Sequence, then a small workaround is required.  Frist I'll explain why GINA installations are a special consideration for OSD.  Next I'll outline a method which should enable this scenario.

OSDGINA.DLL

When deploying Windows 2000, Windows XP, and Windows 2003, OSD installs a custom GINA (OSDGINA.DLL) after applying the image (or via cmdlines.txt for the unattended install case).  This allows OSD to install the ConfigMgr client, complete the task sequence, and block user logon until the task sequence is complete. 

When OSDGINA.DLL is installing, it checks the registry to see if a GINA other than MSGINA is installed, and if so, backs up the value of HKLM\Software\Microsoft\Windows NT\CurrentVertion\Winlogon!GinaDLL to OSDOldGinaDLL.  When the task sequence is complete and OSDGINA.DLL is uninstalling, it restores any value which was backed up to OSDOldGinaDLL.

When a custom GINA is installed, it overwites the GinaDLL registry value and triggers a reboot.  This effectively aborts the Task Sequence, since it is OSDGINA.DLL that bootstraps the Task Sequence after any reboots in the new operating system, until the Task Sequence has completed.  Since OSD pauses Software Distribution until the end of the Task Sequence, this also means that Software Distribution will remain in a paused state.

The Solution

For the installation of a custom GINA in an Install Software Step (as part of an OSD Task Sequence) to work correctly, the GinaDLL value needs to be restored to “OSDGINA.DLL” and the OSDOldGinaDLL value to be set to the GINA DLL for the custom GINA.  This can be accomplished by suppressing the reboot triggered by the Install Software action for the custom GINA, and running a custom command line step right after to make the registry changes.  Assuming for the sake of illustration that the custom GINA DLL is MYGINA.DLL, the registry needs to end up looking like this:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon!GinaDLL = OSDGINA.DLL

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon!OSDOldGinaDLL = MYGINA.DLL

You can have this step reboot to clear the pending reboot, if desired.