Home > Articles > Operating Systems, Server

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Working with Registry Entries

Now that you've had a look around, you're ready to start working with the Registry's keys and settings. In this section, I'll give you the general procedures for basic tasks, such as modifying, adding, renaming, deleting, and searching for entries, and more. These techniques will serve you well throughout the rest of the book when I take you through some specific Registry modifications.

Changing the Value of a Registry Entry

Changing the value of a Registry entry is a matter of finding the appropriate key, displaying the setting you want to change, and editing the setting's value. Unfortunately, finding the key you need isn't always a simple matter. Knowing the root keys and their main subkeys, as described earlier, will certainly help, and the Registry Editor has a Find feature that's invaluable. (I'll show you how to use it later.)

To illustrate how this process works, let's work through an example: changing your registered owner name and company name. In earlier versions of Windows, the installation process probably asked you to enter your name and, optionally, your company name. These registered names appear in several places as you work with Windows:

  • If you select Help, About in most Windows 7 programs, your registered names appear in the About dialog box.
  • If you install a 32-bit application, the installation program uses your registered names for its own records (although you usually get a chance to make changes).

Unfortunately, if you install a clean version of Windows 7, Setup doesn't ask you for this data, and it takes your username as your registered owner name. (If you upgraded to Windows 7 for Windows XP, the owner name and company name were brought over from your previous version of Windows.) With these names appearing in so many places, it's good to know that you can change either or both names (for example, to put in your proper names if Windows 7 doesn't have them or if you give the computer to another person). The secret lies in the following key:

HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion

To get to this key, you open the branches in the Registry Editor's tree pane: HKEY_LOCAL_MACHINE, and then SOFTWARE, and then Microsoft, and then Windows NT. Finally, click the CurrentVersion subkey to select it. Here, you see a number of settings, but two are of interest to us (see Figure 12.4):

RegisteredOrganization

This setting contains your registered company name.

RegisteredOwner

This setting contains your registered name.

Figure 12.4

Figure 12.4 Navigate to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion to see your registered names.

Now you open the setting for editing by using any of the following techniques:

  • Select the setting name and either select Edit, Modify or press Enter.
  • Double-click the setting name.
  • Right-click the setting name and click Modify from the context menu.

The dialog box that appears depends on the value type you're dealing with, as discussed in the next few sections. Note that edited settings are written to the Registry right away, but the changes might not go into effect immediately. In many cases, you need to exit the Registry Editor and then either log off or restart Windows 7.

Editing a String Value

If the setting is a REG_SZ value (as it is in our example), a REG_MULTI_SZ value, or a REG_EXPAND_SZ value, you see the Edit String dialog box, shown in Figure 12.5. Use the Value Data text box to enter a new string or modify the existing string, and then click OK. (For a REG_MULTI_SZ multistring value, Value Data is a multiline text box. Type each string value on its own line. That is, after each string, press Enter to start a new line.)

Figure 12.5

Figure 12.5 You see the Edit String dialog box if you're modifying a string value.

Editing a DWORD or QWORD Value

If the setting is a REG_DWORD, you see the Edit DWORD (32-Bit) Value dialog box shown in Figure 12.6. In the Base group, select either Hexadecimal or Decimal, and then use the Value Data text box to enter the new value of the setting. (If you chose the Hexadecimal option, enter a hexadecimal value; if you chose Decimal, enter a decimal value.) Note that editing a QWORD value is identical, except that the dialog box is named Edit QWORD (64-Bit) Value, instead.

Figure 12.6

Figure 12.6 You see the Edit DWORD Value dialog box if you're modifying a double word value.

Editing a Binary Value

If the setting is a REG_BINARY value, you see an Edit Binary Value dialog box like the one shown in Figure 12.7.

Figure 12.7

Figure 12.7 You see the Edit Binary Value dialog box if you're modifying a binary value.

For binary values, the Value Data box is divided into three vertical sections:

  • Starting Byte Number—The four-digit values on the left of the Value Data box tell you the sequence number of the first byte in each row of hexadecimal numbers. This sequence always begins at 0, so the sequence number of the first byte in the first row is 0000. There are eight bytes in each row, so the sequence number of the first byte in the second row is 0008, and so on. You can't edit these values.
  • Hexadecimal Numbers (Bytes)—The eight columns of two-digit numbers in the middle section display the setting's value, expressed in hexadecimal numbers, where which each two-digit number represents a single byte of information. You can edit these values.
  • ANSI Equivalents—The third section on the right side of the Value Data box shows the ANSI equivalents of the hexadecimal numbers in the middle section. For example, the first byte of the first row is the hexadecimal value 54, which represents the uppercase letter T. You can also edit the values in this column.

Editing a .reg File

If you exported a key to a registration file, you can edit that file and then import it back into the Registry. To make changes to a registration file, find the file in Windows Explorer, right-click the file, and then click Edit. Windows 7 opens the file in Notepad.

Creating a .reg File

You can create registration files from scratch and then import them into the Registry. This is a handy technique if you have some customizations that you want to apply to multiple systems. To demonstrate the basic structure of a registration file and its entries, Figure 12.8 shows two windows. The top window is the Registry Editor with a key named Test highlighted. The Settings pane contains six sample settings: the (Default) value and one each of the five types of settings (binary, DWORD, expandable string, multistring, and string). The bottom window shows the Test key in Notepad as an exported registration file (Test.reg).

Figure 12.8

Figure 12.8 The settings in the Test key shown in the Registry Editor correspond to the data shown in Test.reg file shown in Notepad.

Windows 7 registration files always start with the following header:

Windows Registry Editor Version 5.00

Next is an empty line followed by the full path of the Registry key that will hold the settings you're adding, surrounded by square brackets:

[HKEY_CURRENT_USER\Test]

Below the key are the setting names and values, which use the following general form:

"SettingName"=identifier:SettingValue

SettingName

The name of the setting. Note that you use the @ symbol to represent the key's Default value.

identifier

A code that identifies the type of data. REG_SZ values don't use an identifier, but the other four types do:

dword

Use this identifier for a DWORD value.

hex(b)

Use this identifier for a QWORD value.

hex

Use this identifier for a binary value.

hex(2)

Use this identifier for an expandable string value.

hex(7)

Use this identifier for a multistring value.

SettingValue

This is the value of the setting, which you enter as follows:

String

Surround the value with quotation marks.

DWORD

Enter an eight-digit DWORD value.

QWORD

Enter eight two-digit hexadecimal pairs, separated by commas, with the pairs running from highest order to lowest. For example, to enter the QWORD value 123456789abcd, you would use the following value:

cd,ab,89,67,45,23,01,00

Binary

Enter the binary value as a series of two-digit hexadecimal numbers, separating each number with a comma.

Expandable string

Convert each character to its hexadecimal equivalent and then enter the value as a series of two-digit hexadecimal numbers, separating each number with a comma, and separating each character with 00.

Multistring

Convert each character to its hexadecimal equivalent and then enter the value as a series of two-digit hexadecimal numbers, separating each number with a comma, and separating each character with 00, and separating each string with space (00 hex).

Renaming a Key or Setting

You won't often need to rename existing keys or settings. Just in case, though, here are the steps to follow:

  1. In the Registry Editor, find the key or setting you want to work with, and then highlight it.
  2. Select Edit, Rename, or press F2.
  3. Edit the name and then press Enter.

Creating a New Key or Setting

Many Registry-based customizations don't involve editing an existing setting or key. Instead, you have to create a new setting or key. Here's how you do it:

  1. In the Registry Editor, select the key in which you want to create the new subkey or setting.
  2. Select Edit, New. (Alternatively, right-click an empty section of the Settings pane and then click New.) A submenu appears.
  3. If you're creating a new key, select the Key command. Otherwise, select the command that corresponds to the type of setting you want: String Value, Binary Value, DWORD Value, Multi-String Value, or Expandable String Value.
  4. Type a name for the new key or setting.
  5. Press Enter.

Deleting a Key or Setting

Here are the steps to follow to delete a key or setting:

  1. In the Registry Editor, select the key or setting that you want to delete.
  2. Select Edit, Delete, or press Delete. The Registry Editor asks whether you're sure.
  3. Click Yes.
  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020