Registry key values control the availability or behavior of many of the MSGINA features. Unless otherwise noted, these key values belong to a registry key referred to as the Winlogon key and have value types of [REG_SZ]. The actual path of the Winlogon key is:
\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Having [REG_SZ] value types makes it convenient to query the key values
using the GetProfileString and GetProfileInt functions.
These key value names are:
Value | Description |
LegalNoticeCaption | Any string you want displayed as the dialog caption. |
LegalNoticeText | Any string you want displayed as the dialog body. |
1. To enable a user to be automatically logged on exactly once. If the user logs off or the system is shut down, the user will not be automatically logged on afterward. The user must have a null password in order for this feature to be used.
2. To enable a user to be logged on every time the system boots or the user logs off.
This feature uses the following values of the Winlogon key:
Value | Description |
AutoAdminLogon | "1" or any other string value. |
DefaultUserName | The name of the user to automatically log on. |
DefaultDomainName | The name of the domain that the user account is in. |
DefaultPassword | The password of the user account, in clear text. |
If the AutoAdminLogon key value is present and contains a 1, an automatic logon will occur based on the DefaultPassword key value.
The account being logged onto is specified using the DefaultUserName and DefaultDomainName key values. If present and non-null, the password in DefaultPassword is also used.
If an automatic logon is being performed but the DefaultPassword key value is not present or is null, this is a one-time only autologon. The AutoAdminLogon key value will be set to contain a zero before the logon is attempted. This prevents any future autologons.
There is one additional caveat to autologon. If an autologon is indicated,
MSGINA checks the state of the SHIFT key. If it is held down, it is assumed
that the user wants to override autologon and provide identification and
authentication information interactively. This is a critical feature when
you are debugging a dedicated application. The SHIFT override of automatic
logon is disabled if the IgnoreShiftOverride key value is present and has
a value of 1.
Value | Description |
ShutdownWithoutLogon | "1" to include button; any other value to exclude button. |
There can be more than one program listed under Winlogon, each separated
by a comma. By default, Explorer is listed. If the shell registry value
is not found or has no programs listed, Explorer is activated as the default
shell.