Article ID: 163032
Article Last Modified on 8/8/2007
256986 Description of the Microsoft Windows Registry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeMTA\Parameters\TextEventLogging
' ------------------------------------------------------------------------ ' Q153188 Script to enable bf*.log, ev*.log and ap*.log for 5.x MTA ' ------------------------------------------------------------------------ ' Copyright (C) 1996-2000 Microsoft Corporation ' ' You have a royalty-free right to use, modify, reproduce and distribute ' the Sample Application Files (and/or any modified version) in any way ' you find useful, provided that you agree that Microsoft has no warranty, ' obligations or liability for any Sample Application Files. ' ------------------------------------------------------------------------Windows Script Host must be installed. To do so, visit the following MSDN Web site: NOTE: In the code that follows, "HKLM" means "HKEY_LOCAL_MACHINE".
Choice = Inputbox("Enter 1 to make the changes or 2 to set them to defaults")
Select Case Choice
Case "1"
L_Welcome_MsgBox_Message_Text = "This script configures the MTA to provide bf, ev and ap logs for advanced analysis."
L_Welcome_MsgBox_Title_Text = "Modifying registry values"
Call Welcome()
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.Popup "Setting value HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Parameters\Text Event Log to 1"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Parameters\Text Event Log" , 1, "REG_DWORD"
WSHShell.Popup "Setting value HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\X.400 Service to Level 4"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\1 X.400 Service" , 4, "REG_DWORD"
WSHShell.Popup "Setting value HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\APDU to Level 4"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\12 APDU" , 4, "REG_DWORD"
WSHShell.Popup "Setting value HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\Interface to Level 5"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\4 Interface" , 5, "REG_DWORD"
WSHShell.Popup "Setting value HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\Interoperability to Level 5"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\11 Interoperability" , 5, "REG_DWORD"
Case "2"
L_Welcome_MsgBox_Message_Text = "This script sets MTA diagnostic logging to default levels."
L_Welcome_MsgBox_Title_Text = "Modifying registry values"
Call Welcome()
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.Popup "Setting value HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Parameters\Text Event Log to 0"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Parameters\Text Event Log" , 0, "REG_DWORD"
WSHShell.Popup "Setting value HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\X.400 Service to Level 0"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\1 X.400 Service" , 0, "REG_DWORD"
WSHShell.Popup "Setting value HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\APDU to Level 0"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\12 APDU" , 0, "REG_DWORD"
WSHShell.Popup "Setting value HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\Interface to Level 0"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\4 Interface" , 0, "REG_DWORD"
WSHShell.Popup "Setting value HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\Interoperability to Level 0"
WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\MSExchangeMTA\Diagnostics\11 Interoperability" , 0, "REG_DWORD"
Case Else
MsgBox "Invalid Input. Enter 1 or 2"
End Select
Sub Welcome()
Dim intDoIt
intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
vbOKCancel + vbInformation, _
L_Welcome_MsgBox_Title_Text )
If intDoIt = vbCancel Then
WScript.Quit
End If
End Sub
Keywords: kbinfo kbusage KB163032