JSI Tip 0429 - Freeware Gina provides the ability to bypass CTRL+ALT+DEL and/or run a logoff script and/or run a shutdown script.

Jerold Schulman

February 22, 1998

2 Min Read
ITPro Today logo in a gray background | ITPro Today

If you don't want to auto-logon (see tip 004) but would like the Logon Dialogue to appear without the need to press CTRL+ALT+DEL and/or you want to run a script when you logoff and/or shutdown, then the msgina.dll replacement from Alexander Frink is for you.
Before you download this software, you must insure that you can recover an unbootable system, either by backing up, and/or having a dual NT boot, and/or running a Repair from a newly created ERD. During testing, I had to boot to an alternate NT install and load the Software hive of my unbootable install to correct an problem I had created.

This latest version comes with a setup program that obviates the need for manually performing the setup below.

Installation and usage:

Copy gina_x86.dll from the archive to %SystemRoot%System32gina_x86.dll. Edit:

HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionWinlogon

Add Value name GinaDLL as type REG_SZ and set the string to gina_x86.dll

Add Value name NeedCtrlAltDel as type REG_SZ:

0 = CTRL+ALT+DEL is not required to logon. The Logon Dialogue box will automatically display.
1 = CTRL+ALT+DEL must be pressed to receive the Logon Dialgue box. Use this setting if you also enable auto-logon (see tip 004).

To define a logoff script, select:

HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionWinlogon and

Add Key using a Key Name of Logoff. Leave Class null. Select

HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionWinlogonLogoff

Add Value name UserScript and/or SystemScript as type REG_SZ and set the string to the full path of your .bat or .exe.
The UserScript is run under the context of %UserName% while the SystemScript is run under the SYSTEM context.

Optionally, Add Value name LogFile as type REG_SZ and set it to the full path of a file that will log the execution (The file is appended for each logout).

Optionally, Add Value name Timeout as type REG_SZ and set it to the number of seconds that must elapse before the hung script is terminated. A value of 0 does not cause a timeout.

To define a shutdown script, select:

HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionWinlogon and

Add Key using a Key Name of Shutdown. Leave Class null. Select

HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionWinlogonShutdown

Add Value name Script as type REG_SZ and set the string to the full path of your .bat or .exe.

Optionally, Add Value name LogFile as type REG_SZ and set it to the full path of a file that will log the execution (The file is appended for each shutdown).

Optionally, Add Value name Timeout as type REG_SZ and set it to the number of seconds that must elapse before the hung script is terminated. A value of 0 does not cause a timeout.

When you run shutdown and a user is logged on, the logoff script is also run. If you run shutdown.exe from the resource kit, the script(s) are also run.

Unistall Instructions:

Edit HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionWinlogon and delete the GinaDLL value name.
You can optionally delete %SystemRoot%System32gina_x86.dll.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like