Thirty-four. Nine examples of application of WIN2000 registry
We know that similar to the Windows 9x operating system, in Windows 2000, the configuration information is also centrally stored in the registry database, but the difference is that the registry editor used to modify the registry file in Windows 9x is, and in Windows 2000, you can use two "registry editors" to edit it: one is, and the other is. The former can be found under the installation directory of Windows 2000\WINNT, and the latter can be found under the installation directory of \WINNT\SYSTEM32. If you feel troublesome, you might as well click "Start"/"Run" directly, and then type "regedit" or "regedt32" at the prompt to open the window of the registry editor. Generally speaking, it is more powerful and safer than (mainly not fully supported data types), but ordinary modifications do not make much difference, so which registry editor to choose depends entirely on your preference. I personally think the interface may be more friendly (as shown in Figure 1). Here, the author uses the editor to introduce several more practical application modification techniques in WIN2000 to everyone, hoping to give you some inspiration.
Before modifying the registry, I would like to give a simple explanation of the project name of the subtree root of the NT registry to help you understand the meaning of the modification:
(1)HKEY_CLASSES_ROOT Includes data related to object links and embeds (OLE) and file class.
(2) HKEY_CURRENT_USER contains the user configuration file of the currently logged in user, including environment variables, desktop settings, network connections, printers and application settings.
(3) HKEY_LOCAL_MACHINE contains information about the local computer system, including hardware and operating system data, such as bus type, system memory, device drivers and startup control data.
(4)HKEY_USERS Contains all currently loaded user profiles, including HKEY_CURRENT_USER and default profiles that always reference the subset of HKEY_USERS. Users who remotely access the server have no configuration files under this entry on the server, and their configuration files are loaded into the registry of their own computer.
(5)HKEY_CURRENT_CONFIG Contains the hardware configuration file information used by the local computer system at startup. This information is used to configure settings, including the loaded device driver and the monitor resolution to be used
In addition, I have to tell you very long-windedly: modifying the registry is quite dangerous. Once you make incorrect changes to the registry, the system will be unstable and the operating system will not be able to boot. Therefore, you should back up the registry file before modification, just in case. Then you might as well click on the first menu of the Registry Editor "Register"/"Export Registry File" (as shown in Figure 2), and then select the storage path. After confirming, you can save the registry file. Of course, you can also use other methods to back up the registry and bring it to handy when necessary. Okay, after doing these, we can feel at ease to modify the registry. All the modification methods in this article are taken as an example.
1. Set up startup information or add warning title
Every time when Windows 2000 starts, the system will display the login information "Please press Ctrl + Alt + Delete key to log in". If you hope that after pressing the Ctrl + Alt + Delete key combination, some information you want to see on the screen will be automatically displayed, you can use the following methods:
Enter HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon primary key, double-click the numeric name of the "LegalNoticeCaption" on the right side of the pane. When the "String Editor" dialog box appears, you can enter the title of the information dialog window in the "String" text box, such as "Please pay attention!", and then double-click the numeric name of the "LegalNoticeText" on the right side. When the "String Editor" dialog box appears, you can enter the content of the information window in the "String" text box, such as "This is a WIN2000 server, please pay attention to your permissions!". In this way, when you or other users start the system, there will be a message box to remind all users who are on the computer to pay attention to their identities and not to randomly modify the system. Of course, you can enter other mottos or greetings to give a very personalized "2000 opening remarks".
2. Turn off the system directly without logging in
In Windows 2000 Professional, when the dialog box "Start Login" appears on the startup screen, in addition to pressing the Ctrl+Alt+Delete key combination at the same time, entering the user name and password and logging in, you can also directly turn off the system (ShutDown), because WIN2000 Professional provides the button option of "ShutDown" under the dialog box, and in WIN2000 Server you must add it yourself. In fact, in most cases, we don’t need to log in (just start the server) to shut down the system directly. At this time, it is very necessary to add a button option to "Shut the System" to its login dialog box. You can use the following methods:
Enter HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon primary key, double-click the "Shutdown WithoutLogon" value name on the right side of the pane. When the "String Editor" dialog box appears, you can enter 1 (or other non-0 values) in the "String" text box. After you complete, log in again, and there will be an additional "Set System" button on the login screen. At this time, as long as you click this button with the mouse, the system will be turned off directly. Isn't it much more convenient?
3. Prohibit the display of the account name of the previous loginer.
When you log in to WIN2000 Server and press Ctrl + Alt + Delete key combination, when the system asks you to enter a user name and password, the name of the previous login will be automatically displayed in the "User Name" box by default. However, sometimes you do not want to display this name, you can use the following methods:
Enter HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon primary key, and double-click the numeric name of "DontDisplayLastUserName" on the right side of the pane. If this name is not available, it can be added using the New command in the Edit menu, whose data type is a string value. When the String Editor dialog box appears, enter 1 (or other non-0 values) in the String text box.
4. Set up automatic login
Every time you log in to Windows 2000, you must press the Ctrl + Alt + Delete key combination at the same time before you can enter the user name and password to log in. Sometimes it is a bit cumbersome. If you want to be faster, you can set up automatic login. You can use the following methods:
Enter HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon primary key, click the "New" command in the "Edit" menu to add a new value. The value name is "DefaultUserName" and the data type is a string value. Then double-click the key, and when the "String Editor" dialog box appears, change the key value to "Administrator" or a superuser in the "String" text box (as shown in Figure 5). Similarly, add a string value key with the name "DefaultPassword", and change its value to your login password, and finally double-click the name of the "AutoadminLogon" value, and change the key value of this data type REG_SZ to 1 (or other non-0 values). Exit the Registry Editor and restart it. If you suddenly don't want the system to automatically log in as "Administrator", just hold down the Shift key at the same time when starting.
5. Cancel the LOGON screen that appears when exiting the system
If you think the shutdown speed is not fast enough, you can cancel the LOGON screen that appears when exiting the system. You can use the following methods:
Enter HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon primary key, double-click the numeric name of "Windows 2000 AutoLogon" on the right side of the pane (you don't create one by yourself). When the "String Editor" dialog box appears, you can change its key value to 0 in the "String" text box, and change the REG_SZ value of "ShutdownWithoutLogon" to 1 (or other non-0 values). When you restart NT, you will never see the tired LOGON screen appear again.
6. Automatic power off
Since Windows 2000 does not support ATX power management, we cannot turn off the power automatically after shutting down the system, but we need to press POWER more. This is really a shortcoming, but you can make a small change and try to let the system do this work by itself. You can use the following methods:
Enter HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon primary key, and double-click the "PowerdownAfterShutdown" numerical name on the right side of the pane (if this name is not available, you can use the "New" command in the "Edit" menu to add it, and its data type is a string value). When the String Editor dialog box appears, you can enter 1 (or other non-0 values) in the String text box and everything is done.
7. Change the wallpaper and background color when logging in or shutting down the system
You can select the background pattern when logging in (or turning off the system), that is, set the background pattern when the "Start Login" dialog box appears on the startup screen and ask to press the Ctrl + Alt + Delete key combination to log in to the Windows 2000 network. You can use the following methods:
Enter HKEY_USERS\.DEFAULT\Control Panel\Desktop primary key, double-click the "Wallpaper" numerical name on the right side of the pane. When the "String Editor" dialog box appears, you can enter the complete path and file name of a bitmap file that can be used as wallpaper in the "String" text box (such as C:\WINNT\), and double-click the "TileWallpaper" numerical name on the right side of the window. When the "String Editor" dialog box appears, enter 1 (or other non-0 values) in the "String" text box.
In addition, if you want to change the background color when logging in, you can use the following methods:
Enter HKEY_USERS\.DEFAULT\Control Panel\Colors primary key, double-click the "Background" value name on the right side of the pane. When the "String Editor" dialog box appears, you can enter a key value representing the color in the "String" text box (see the definition of color values in the image processing software, such as black is 0 0 0). The default value of the system is "58 110 165".
8. Prohibited operation
It is a built-in system maintenance tool, which will be displayed when the program fails to load or crashes, but sometimes a problem is repeatedly reminded is annoying. If you want to cancel it, you can use the following methods:
Enter HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug primary key, double-click the numeric name of "Auto" on the right side of the pane. When the "String Editor" dialog box appears, you can change its key value to 0 in the "String" text box.
9. Force WIN2000 to find connections with the largest MTU among all connections
By default, WIN2000 uses a Maximum Transmission Unit (maximum transmission unit, MTU, the size of the packet) of size 576 to send information to the remote host. If the route through which the data passes cannot process such a large packet, the packets are divided into several fragmented transmissions, and problems may arise. To avoid this, you can modify the registry and force WIN2000 to find connections with the largest MTU among all connections. You can use the following methods:
Enter HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet
Under the primary key of \Services\Tcpip\Parameters, double-click the "EnablePMTUDiscovery" value name on the right side of the pane (if this name is not available, you can use the "Add Value" command in the "Edit" menu to add the data type is a double-byte value). When the Double Byte Value Editor dialog box appears, enter 1 in the Data text box.
(Note: The modification techniques introduced above are all passed in Windows 2000 Server, but most of them can also be used in Windows NT)