程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> Delphi >> Windows 注冊表 (未完成)

Windows 注冊表 (未完成)

編輯:Delphi

由於最近需要用到注冊表,並且操作很多系統設置,所以想吧關於微軟注冊表的東西都寫出來,找了很久才發現,微軟對於注冊表做了很詳細的說明,但是為了節省時間翻譯文本為自動翻譯,手動糾錯,歡迎大家指出錯誤。

 

 

 

根鍵

 

數據類型描述

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,應該有這個項。

ValueMeaning

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

RangeDefault 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 typeRangeDefault value

REG_SZ

0 | 1

1

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

拖動窗口的時候,0為,只顯示輪廓;1為,顯示窗體以及內容。

ValueMeaning

0

Only the outline of the window moves.

1

The entire window and its contents move.

DragHeight

HKCU\Control Panel\Desktop

 

Data typeRangeDefault 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 typeRangeDefault 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 typeRangeDefault 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.

 確定大字體的邊緣畫深淺不同的灰色使字體看起來更平滑。

ValueMeaning

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 typeRangeDefault 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 typeRangeDefault 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 typeRangeDefault 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 typeRangeDefault 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 typeRangeDefault 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 typeRangeDefault 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 typeRangeDefault value

REG_DWORD

0 | 1

0

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

Windows版本和版本號的在桌面上可見。

ValueMeaning

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 typeRangeDefault 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).

 顯示屏幕保護選項

ValueMeaning

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 typeRangeDefault 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 typeRangeDefault 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 背景圖片位置

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved