Windows 注册表 (未完成)

时间:2023-03-09 15:44:58
Windows 注册表 (未完成)

由于最近需要用到注册表,并且操作很多系统设置,所以想吧关于微软注册表的东西都写出来,找了很久才发现,微软对于注册表做了很详细的说明,但是为了节省时间翻译文本为自动翻译,手动纠错,欢迎大家指出错误。

根键

数据类型 描述

REG_BINARY

原始二进制数据。多数硬件组件信息都以二进制数据存储,而以十六进制格式显示在注册表编辑器中。

REG_DWORD

数据由 4 字节长的数表示。设备驱动程序和服务的很多参数都是这种类型,这些参数在注册表编辑器中是以二进制、十六进制或十进制的格式显示的。

REG_EXPAND_SZ

长度可变的数据串。该数据类型包含在程序或服务使用该数据时解析的变量。

REG_MULTI_SZ

多重字符串。包含列表或多值(其格式可被用户读取)的值通常为该类型。各个值项之间用空格、逗号或其他标记分开。

REG_SZ

固定长度的文本字符串。

REG_FULL_RESOURCE_DESCRIPTOR

一系列嵌套数组,专用于存储硬件元件或驱动程序的资源列表。

 

有关管理注册表的详细信息,请参阅 Microsoft Windows 资源工具包网站上有关 Windows Server 2003 家族注册表参考的内容。

注册表子树

Windows Server 2003 家族操作系统具有两个注册表子树:HKEY_LOCAL_MACHINE 和 HKEY_USERS。不过,为了使注册表中的信息易于查找,“注册表编辑器”工具显示有五棵子树,其中三棵是注册表其他部分的别称。下表列出并说明了这五棵子树。

根项名称 描述

HKEY_LOCAL_MACHINE

包含关于本地计算机系统的信息,包括硬件和操作系统数据,如总线类型、系统内存、设备驱动程序和启动控制数据。

HKEY_CLASSES_ROOT

包含用于各种 OLE 技术和文件类关联数据的信息。如果 HKEY_LOCAL_MACHINE\SOFTWARE\Classes 或HKEY_CURRENT_USER\SOFTWARE\Classes 中存在相应的项或值,则在 HKEY_CLASSES_ROOT 中会存在某个特定的项或值。如果两处均存在项或值,则 HKEY_CURRENT_USER 版本将是出现在 HKEY_CLASSES_ROOT 中的那一个。

HKEY_CURRENT_USER

包含当前以交互方式(与远程方式相反)登录的用户的用户配置文件,包括环境变量、桌面设置、网络连接、打印机和程序首选项。该子树是 HKEY_USERS子树的别名,它指向 HKEY_USERS\当前用户的安全 ID

HKEY_USERS

包含关于动态加载的用户配置文件和默认配置文件的信息。它包含同时出现在 HKEY_CURRENT_USER 中的信息。正在远程访问服务器的用户在服务器上的该项下没有配置文件;他们的配置文件将加载到自己计算机的注册表中。

HKEY_CURRENT_CONFIG

包含在启动时由本地计算机系统使用的硬件配置文件的相关信息。该信息用于配置一些设置,如要加载的设备驱动程序、显示时要使用的分辨率。该子树属于HKEY_LOCAL_MACHINE 子树,它指向 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current

每个根项名均以 HKEY_ 开头,以便向软件开发人员指出这是可以由程序使用的句柄。句柄是一个值,用于识别资源。有了句柄,程序就能对资源进行访问。

注意

  • 在 Windows 2000 和 Windows Server 2003 家族操作系统中,HKEY_CLASSES_ROOT 的行为与以前版本 Windows 中的该项的行为有所不同。在 Windows 2000 和 Windows Server 2003 家族操作系统中,有一个称为“每用户类注册”的特性提供了 HKEY_CLASSES_ROOT 视图,其中包含了用户特定的类注册和计算机特定的类注册。通过该特性,不同的用户可以有不同的类注册(包括文件关联、COM 组件和 MIME 类型的注册)集合。以前,所有用户共享注册,所以一个用户可以更改其他用户的注册信息。每用户类注册隔离了每个用户的注册,允许管理员提高 HKEY_LOCAL_MACHINE\Software\Classes 上的安全性。

微软对注册表的简单说明:(http://support.microsoft.com/kb/256986/zh-cn

MSDN 关于注册表的说明:http://msdn.microsoft.com/en-us/library/ms724871(v=vs.85).aspx

原文:

The registry is a system-defined database in which applications and system components store and retrieve configuration data. The data stored in the registry varies according to the version of Microsoft Windows. Applications use the registry API to retrieve, modify, or delete registry data.

注册表是一个系统定义的数据库用于应用程序和系统组件配置数据的存储和检索,注册表中存储的数据因Windows版本而不同;应用程序可以用注册表的API检索、修改或删除注册表数据。

You should not edit registry data that does not belong to your application unless it is absolutely necessary. If there is an error in the registry, your system may not function properly. If this happens, you can restore the registry to the state it was in when you last started the computer successfully. For more information, see the help for your operating system.

你不应该修改注册表不属于您的应用程序的数据,除非必要的修改。如果注册表中有一个错误,你的系统可能无法正常工作。如果发生这种情况,你可以恢复注册表的状态到你上一次正常启动系统的状态。有关更多信息,请参阅您的操作系统的帮助。

预定义键

HKCU简称,HKEY_CURRENT_USER\Control Panel\Desktop,HKCU/控制面板/桌面的内容,这个是2003的。http://technet.microsoft.com/en-us/library/cc776173(v=ws.10).aspx

项:ActiveWndTrkTimeout

Specifies time (in milliseconds) that the mouse needs to remain over a window before the window is activated.

指定时间(以毫秒为单位),鼠标经过保持多久在窗口内,窗口被激活。

项:AutoEndTasks 值: 0 | 1

Specifies whether user processes end automatically when the user either logs off or shuts down Windows Server 2003.

当用户注销或关机掉系统时,指定用户进程是否结束。我的理解是,如果关机、注销的时候用户正在运行的应用程序,是否自动关闭。如果默认值为0的话,那么将系统将会等待程序接受关闭,如果程序不能响应关闭程序,那么将会出现,关机时候的提示结束对话框;我用Win7 默认值为1,也就是系统将自动关闭用户开启的应用程序。以前用xp的时候,自动关机有的时候不能关,就是有些应用程序响应关机请求,所以无法关机,要改正的话可以修改为1;还没有测试xp,应该有这个项。

Value Meaning

0

Processes do not end automatically. The system waits until the process ends, and, if the process takes more time than the value of the HungAppTimeout entry, then the End Task dialog box appears, stating that the application cannot respond to the End Task request.

进程不会自动结束。系统等待,直到过程结束后,如果进程需要更多的时间比HungAppTimeout条目的价值,然后结束任务对话框出现,说明该应用程序不能响应结束任务请求。

1

Processes end automatically.

过程自动结束。

CoolSwitch

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

0 | 1

1

冷切换;也就是ALT 按住,再按Tab键切换窗口这个,Win7 没有找到这个项,但是找到了CoolSwitchColumns,CoolSwitchRows,也就是切换窗口的图标有7列、3行。所以就不对这个两个项进行说明了。

CursorBlinkRate

HKCU\Control Panel\Desktop

http://technet.microsoft.com/en-us/library/cc757455(v=ws.10).aspx

Data type 数据类型 Range 十进制的毫秒 Default value 默认值

REG_SZ

Milliseconds in decimal

530

描述

Specifies how much time elapses between each blink of the selection cursor.我的理解是光标闪烁时间,如果为-1的话,光标就不再闪烁。

DragFullWindows

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

0 | 1

1

Specifies what appears on the screen while a user drags a window.

拖动窗口的时候,0为,只显示轮廓;1为,显示窗体以及内容。

Value Meaning

0

Only the outline of the window moves.

1

The entire window and its contents move.

DragHeight

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

Number of pixels in decimal

4

Specifies the height of the rectangle used to detect the start of a drag operation.

指定用于检测一个拖放操作开始的矩形的高度

DragWidth

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

Number of pixels in decimal

4

Specifies the width of the rectangle used to detect the start of a drag operation.指定用于检测一个拖放操作开始的矩形的宽度。

FontSmoothing

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

0 | 2

2

Determines whether the edges of large fonts are painted in different shades of gray to make the font look smoother.

确定大字体的边缘画深浅不同的灰色使字体看起来更平滑。

Value Meaning

0

Font smoothing is disabled. Edges are not painted different shades of gray.

2

Font smoothing is enabled. Edges are painted different shades of gray.

ForegroundFlashCount

HKCU\Control Panel\Desktop

Data type Range Default value

REG_DWORD

Number of flashes in decimal

3

Specifies the number of times the taskbar button flashes to notify the user that the system has activated a background window. If the time elapsed since the last user input exceeds the value of the ForegroundLockTimeout entry, the window will automatically be brought to the foreground.

指定闪烁任务栏按钮次数,通知用户系统激活背景窗口。不太明白这个。。。windows 7默认7次;

ForegroundLockTimeout

HKCU\Control Panel\Desktop

Data type Range Default value

REG_DWORD

Milliseconds

200000

Description

Specifies the time, following user input, during which the system keeps applications from moving into the foreground automatically (without selection by the user).

GridGranularity

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

0–49 (8-pixel units)

0

Windows Server 2003 does not use this entry, however, the entry remains in the registry to support programs designed for Windows NT 4.0 or earlier.

桌面大小网格的颗粒度值,不要修改、删除该项

HungAppTimeout

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

Milliseconds in decimal

5000

Specifies how long the system waits for user processes to end after the user clicks the End Task command button in Task Manager or after the user has selected to restart or shutdown the system. If this threshold is exceeded, the End Task dialog box appears, stating that the process did not respond.

用户在任务管理器单击结束任务的命令按钮等待的时间,或在用户已经选择要重新启动或关闭系统。如果超过阈值时,出现“结束任务”对话框,说明过程没有回应。

MenuShowDelay

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

Milliseconds in decimal

400

Specifies the interval from the time the cursor is pointed at a menu until the menu items are displayed.

指定当鼠标指向菜单知道菜单项目显示时的间隔时间

HungAppTimeout

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

Milliseconds in decimal

5000

Specifies how long the system waits for user processes to end after the user clicks the End Task command button in Task Manager or after the user has selected to restart or shutdown the system. If this threshold is exceeded, the End Task dialog box appears, stating that the process did not respond.

PaintDesktopVersion

HKCU\Control Panel\Desktop

Data type Range Default value

REG_DWORD

0 | 1

0

Specifies whether the version and build number of Windows is visible on the desktop.

Windows版本和版本号的在桌面上可见。

Value Meaning

0

Disabled. The version and build number of Windows does not appear on the desktop.

1

Enabled. The version and build number of Windows appears on the desktop.

ScreenSaveActive

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

0 | 1

0

Specifies whether a screen saver is selected. Windows Server 2003 has a default value of 0 for this entry (Windows XP has 1).

显示屏幕保护选项

Value Meaning

0

No screen saver is selected.

1

A screen saver is selected.

Change Method

To select a screen saver, in Control Panel double-click Display, then click the Screen Saver tab. You can then either select a screen saver from the list or select (None).

Note

  • This entry can be superseded by a Group Policy setting included in Windows Server 2003. While the No screen saver Group Policy setting is enabled, the system ignores this entry. The configuration of the No screen saver Group Policy setting is stored in the ScreenSaveActive entry, which is in the Policies subkey.

ScreenSaveTimeOut

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

Seconds in decimal

600 (10 minutes)

Specifies how long the system must remain idle before the screen saver starts.

指定多久启动屏幕保护程序

Change Method

To change the value of this entry, in Control Panel double-click Display, click the Screen Saver tab, and then change the value in the Wait box.

SCRNSAVE.EXE

HKCU\Control Panel\Desktop

Data type Range Default value

REG_SZ

File name

(None)

Description

Specifies the name of the screen saver executable file.指定屏幕保护程序的可执行文件的名称。

Change Method

To change the value of this entry, in Control Panel double-click Display, click the Screen Saver tab, and then select a screen saver from the Screen saver list.

You can also change this entry with the application programming interface (API) function InstallScreenSaver, which is exported by Desk.cpl. You can access this function with the command line rundll32.exe desk.cpl,InstallScreenSaver %1, where %1 is the name of a screen saver executable file.

Activation Method

Changes made to this entry become effective the next time the system starts a screen saver.

TileWallpaper 在屏幕上如何显示桌面壁纸 0 居中、1平铺

WindowMetrics

该子键位于HKEY_USERS\.DEFAULT\Control Panel\desktop\WindowMetrics分支上,该子键保存了如何显示窗口的信息,
这些信息显示如下:
# IconSpacingFactor=100:设置图标间距因子。
# ScrollWidth=-270:设置滚动宽度。
# ScrollHeight=-270:设置滚动高度。
# IconSpacing=-1155:设置图标间距。
# IconVerticalSpacing=-1125:设置图标垂直间距。
# IconFont=hex:09,00,00,00,00,00,00,00,90,01,00,00,... ... :设置图标字体。此字体使用十六进制表示出来。
# CaptionFont=hex:09,00,00,00,00,00,00,00,90,01,00,00,00,... ... :设置标题字体。
# MenuFont=hex:09,00,00,00,00,00,00,00,90,} 01,00,00,00,00,... ... :设置菜单字体。
# SmCaptionFont=hex:09,00,00,00,00,00,00,00,bc,02,00,00,... ... :设置调色板标题字体。
# StatusFont=hex:09,00,00,00,00,00,00,00,90,01,00,00,00,86,00,... ... :设置状态栏字体。
# MessageFont=hex:09,00,00,00,00,00,00,00,90,01,00,00,00,86,00,... ... :设置信息字体。
# BorderWidth=-15:设置边框宽度。
# CaptionWidth=-270:设置标题宽度。
# CaptionHeight=-270:设置标题高度。
# SmCaptionWidth=-210:设置调色板标题的宽度。
# SmCaptionHeight=-210:设置调色板标题的高度。
# MenuWidth=-270:设置菜单宽度。
# MenuHeight=-270:设置菜单的高度。
# Shell Icon Size=32:图标尺寸为32× 32。

WindowArrangementActive Windows7窗口智能排列是否启用

BlockSendInputResets 修改此键值可以避免QQ等请求从屏幕保护中显示出来。

CaretWidth 指定的闪烁符号的宽度。
ScreenSaverIsSecure 屏幕保护密码保护,0无,1有
Wallpaper 背景图片位置