110 likes | 442 Views
Windows Registry. Application Developer Issues SIG North Texas PC Users Group January 11, 2003 Daniel Ogden SIG Co-Leader http://appdevissues.tripod.com http://appdevissues.tripod.com/downloads.htm. Windows Registry. Windows Registry Settings
E N D
Windows Registry Application Developer Issues SIG North Texas PC Users Group January 11, 2003 Daniel Ogden SIG Co-Leader http://appdevissues.tripod.com http://appdevissues.tripod.com/downloads.htm
Windows Registry • Windows Registry Settings (From Windows Customization presentation of 12-14-2002) • Not for the faint of heart • Contrary to Microsoft and other’s recommendations, use “regedit.exe” rather than “regedt32.exe” for most registry operations • Permissions • Saving of keys as “Favorites” • Local run/Current User run • Default separate vdm • Current Control Set
Windows Registry • Scope of Presentation • Windows NT 4.0/2000/XP only • Registry Structure • Registry Elements • Registry in Windows Boot Process • Registry Security • Registry Customization
Windows Registry • Registry Structure • Subtree-Root Level of the Registry • Five Subtrees- • HKEY_LOCAL MACHINE • Local system hardware, device drivers, services, and machine-specific application data information. • HKEY_USERS • Pre-logon default user profile information and HKEY_CURRENT_USER key • HKEY_CURRENT_USER • Currently logged on user profile information • HKEY_CLASS_ROOT • Software configuration information from the HKEY_LOCAL MACHINE\SOFTWARE\Classes key • HKEY_CURRENT _CONFIG • Hardware information from the HKEY_LOCAL MACHINE\SOFTWARE and HKEY_LOCAL MACHINE\ SYSTEM keys
Windows Registry • Registry Elements • Keys/Subkeys • Defines the structure of the registry • Similar to folders in a file system • Values • Contains Registry data in specific subkeys • Five types of values • String value (REG_SZ)-Single line string value • Binary value (REG_BINARY)-Binary value • DWORD value (REG_DWORD)-Doubleword value up to four bytes long • Multi-string value (REG_MULTI_SZ)-Multiple line string value • Expandable string value (REG_EXPAND_SZ)-Expandable string value • Hives • System-accessible only files containing registry database • Consist of a data file and a log file • Path- “%systemroot%\System32\config”
Windows Registry • Registry in Windows Boot Process • In the initial hardware detection phase, NTDETECT.COM detects the installed hardware, which information later will be stored in the HKEY_LOCAL MACHINE\HARDWARE key. • NTLDER then loads the information in the HKEY_LOCAL MACHINE\SYSTEM key, which contains the information regarding the device and service drivers that will be loaded. • NTLDR then creates the HKEY_LOCAL MACHINE\HARDWARE key and a Clone ControlSet key, which is a read-only copy of the ControlSet key created in step 2. • The boot process then initializes the drivers and services loaded earlier and records any errors in the Registry.
Windows Registry • Registry Security • Security is set by Registry permissions. • In Windows 2000, regedt32.exe must be used to set permissions. In Windows XP, regedit.exe can also be used. • Are two basic permission available • Read • Full Control • By default, only the System and Administrators have “full control” permissions • Can also create specific permissions • Inheritance behavior can be set to determine which permissions are inherited to child keys • Registry access can also be audited
Windows Registry • Registry Customization • Two native Windows Registry editors available • Regedt32.exe • Regedit.exe • While many books recommend using regedt32.exe as only it supports read-only mode and permissions (Windows 2000 only), regedit.exe is much easier to work with and is recommended for experienced Registry editors. • Can set certain keys as “Favorites” in regedit.exe • Can export keys to a text file (“regedit4” mode)
Windows Registry • Registry Customization • HKEY_CURRENT_USER • Control Panel • Software\{Various software apps} • Software\Microsoft • Software\Microsoft\Windows\Current Version • Software\Microsoft\Windows NT\Current Version • HKEY_LOCAL MACHINE • Software\Classes • Software\{Various software apps} • Software\Microsoft • Software\Microsoft\Windows\Current Version • Software\Microsoft\Windows NT\Current Version • System\CurrentControlSet
Windows Registry • Sources • Source for much of this presentation: Microsoft Windows 2000 Professional Installation and Configuration Handbook (Que Books)-Appendix A: The Registry and Registry Editors • Strongly recommend visiting http://www.winguides.com/registry/ as it has a collection of Registry books, Registry tips, and even a Registry tutorial