Skip to content

Ingan121/CLH_GINA

 
 

Repository files navigation

CLH_GINA

  • Fork of ConsoleLogonHook that uses resources from msgina.dll from Windows NT 4.0, 2000, or XP to create a GINA-like logon screen.

Warning

THIS PROJECT IS IN EARLY DEVELOPMENT AND MIGHT BE UNSTABLE

You may encounter issues using a Microsoft account, however, this will work perfectly fine on local accounts.

Disabling the lockscreen and the CTRL Alt Del logon keybinds is recommended as they're not fully implemented yet.

Knowing this, You might use this at your own risk.

How to contribute to the project

The following steps explain how you can contribute to the project

  1. Fork this repository.
  2. Pull using git commandline, or any Git UI manager (such as Github Desktop, etc.)
  3. Enjoy.

Installation

Warning

This will require administrator privileges to be installed.

  • If you have installed the original ConsoleLogonHook, replace ConsoleLogonHook.dll and ConsoleLogonUI.dll with DLLs from this repository and proceed to step 4.
  1. Copy the 2 DLL files (ConsoleLogonHook.dll and ConsoleLogonUI.dll) from Releases into %SYSTEMROOT%\System32

  2. Open a CMD window as TrustedInstaller via PsExec64 and copy and paste the following commands:

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Internal.UI.Logon.Controller.ConsoleBlockedShutdownResolver /v DllPath /t REG_SZ /d %systemroot%\System32\ConsoleLogonHook.dll /f

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Internal.UI.Logon.Controller.ConsoleLockScreen /v DllPath /t REG_SZ /d %systemroot%\System32\ConsoleLogonHook.dll /f

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Internal.UI.Logon.Controller.ConsoleLogonUX /v DllPath /t REG_SZ /d %systemroot%\System32\ConsoleLogonHook.dll /f

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Internal.Shell.PlatformExtensions.ConsoleCredUX /v DllPath /t REG_SZ /d %systemroot%\System32\ConsoleLogonHook.dll /f

or merge the regkey in the release zip as trusted installer.

  1. Take ownership of the file Windows.UI.Logon.dll and rename it to something else. Example: Windows.UI.Logon.dll.bak, this is required as it will force the use of the console logon screen.

  2. Get a copy of msgina.dll from Windows NT 4.0, 2000, or XP and place it in %SYSTEMROOT%\System32.

Registry keys

General Windows logon screen customization

  • (RECOMMENDED) Disable the lockscreen
    • Create a DWORD value named NoLockScreen in HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization and set it to 1.
  • To manually type the username, create a DWORD value named DontDisplayLastUserName in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System and set it to 1.`
    • This is optional, as CLH_GINA handles the friendly logon as well.
  • To enable verbose logon messages, create a DWORD value named VerboseStatus in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System and set it to 1.

Registry keys specific to CLH_GINA

  • Available at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\CLH_GINA
Name Type Description Default Behavior
ShowConsole REG_DWORD Set to 1 to show the console window. Hidden
ClassicTheme REG_DWORD Set to 2 to make windows use the basic theme.
Set to 1 to make the windows use the classic theme.
Set to 0 to use the default theme.
Basic theme when using XP msgina.dll, classic theme otherwise
HideStatusView REG_DWORD Set to 1 to hide the status view.
Set to 0 to show the status view.
Hidden only when using NT4 msgina.dll
HideCapsLockBalloon REG_DWORD Set to 1 to hide the caps lock warning balloon.
Set to 0 to show the caps lock warning balloon.
Shown only when using XP msgina.dll
CustomWallHost REG_SZ Set to the path of the host process for the custom wallpaper.
If the value is not present, CLH_GINA's custom wallpaper implementation will be used.
CLH_GINA's custom wallpaper implementation
CustomWallHostArgs REG_SZ Set to the arguments for the custom wallpaper host process. None
CustomBrd REG_SZ Set to the path of a BMP file to use as the small branding image. Small branding image from msgina.dll
CustomBrdLarge REG_SZ Set to the path of a BMP file to use as the large branding image. Large branding image from msgina.dll
CustomBrdBG REG_DWORD Set to the color to show behind the brand bitmap. Blue when using XP msgina.dll, white when using 2000 msgina.dll
CenterBrand REG_DWORD Set to 1 to center the branding image horizontally.
Set to 0 to left-align the branding image.
Centered only when using XP msgina.dll
CustomBar REG_SZ Set to the path of a BMP file to use as the bar image. Bar image from msgina.dll
OptionsExpanded REG_DWORD Set to 1 to expand the options by default.
Set to 0 to collapse the options by default.
This key is internally managed.
Collapsed

Customizing the pre-logon background and color scheme

  • Color scheme: HKEY_USERS\S-1-5-18\Control Panel\Colors.
    • It is recommend to run WinClassicThemeConfig as NT AUTHORITY\SYSTEM with PsExec or gsudo to change the color scheme of the logon screen.
    • Or set CustomWallHost to the path of the WinClassicThemeConfig executable temporarily and go to the switch user screen to change the color scheme and window metrics.
    • Make sure to remove the CustomWallHost value after changing the color scheme, as it is possible to spawn a SYSTEM cmd.exe with WinClassicThemeConfig through file dialogs.
  • To prevent reverting to the default color scheme, rename HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\DefaultColors\Standard to something else.
  • Background color: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Background, default is 0 0 0 (black). Delete the value to use the background color from the color scheme.
  • Background image: HKEY_USERS\S-1-5-18\Control Panel\Desktop\Wallpaper. (REG_SZ, create if missing)
  • Background image style: HKEY_USERS\S-1-5-18\Control Panel\Desktop\WallpaperStyle, default is 0 (centered). Set to 2 for stretched, 6 for fit, and 10 for fill. (REG_SZ too, create if missing)
  • Set HKEY_USERS\S-1-5-18\Control Panel\Desktop\TileWallpaper to 1 to tile the background image.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.5%
  • C 0.5%