How to enable user environment debug logging in Windows

http://support.microsoft.com/kb/221833/en-us
The short version:
Use Registry Editor to add the following registry value (or modify it, if the value already exists):
Key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Value: UserEnvDebugLevel
Value Type: REG_DWORD
Value Data: 10002 (Hexadecimal)
Value: UserEnvDebugLevel
Value Type: REG_DWORD
Value Data: 10002 (Hexadecimal)
UserEnvDebugLevel can have the following values:
NONE 0×00000000
NORMAL 0×00000001
VERBOSE 0×00000002
LOGFILE 0×00010000
DEBUGGER 0×00020000
NORMAL 0×00000001
VERBOSE 0×00000002
LOGFILE 0×00010000
DEBUGGER 0×00020000
The default value is NORMAL|LOGFILE (0×00010001).
Note To disable logging, select NONE (where the value is 0X00000000).
Posted: December 27th, 2006 under Windows.
Comments: none