Logo
CAR REVIEW
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
Windows Server

Working with the Windows Home Server Registry : Working with Registry Entries - Changing the Value of a Registry Entry

1/11/2013 3:33:59 PM

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.

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. 

To illustrate how this process works, let’s look at an example: changing your registered owner name and company name. In other versions of Windows, the installation process often asks 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 programs, your registered names appear in the About dialog box.

  • If you install an application, the installation program uses your registered names for its own records (although you usually get a chance to make changes).

Unfortunately, Windows Home Server doesn’t ask you for this data. Instead, it uses the generic values Owner for the owner name and Organization for the organization name.

With these names appearing in so many places, it’s good to know that you can change either or both names. 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 1).

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

Tip

If you have keys that you visit often, you can save them as favorites to avoid trudging through endless branches in the Keys pane. To do this, navigate to the key and then select Favorites, Add to Favorites. In the Add to Favorites dialog box, edit the Favorite Name text box, if desired, and then click OK. To navigate to a favorite key, pull down the Favorites menu and select the key name from the list that appears at the bottom of the menu.


RegisteredOrganizationThis setting contains your registered company name.
RegisteredOwnerThis setting contains your registered name.

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 Home Server.

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 2. 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.

Figure 2. 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 3. 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 3. 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 4.

Figure 4. 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 NumberThe 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 each two-digit number represents a single byte of information. You can edit these values.
ANSI EquivalentsThe third section on the right side of the Value Data box shows the American National Standards Institute (ANSI) equivalents of the hexadecimal numbers in the middle section. For example, the first byte of the first row is the hexadecimal value 44, which represents the uppercase letter D. 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 change a registration file, find the file in Windows Explorer, right-click the file, and then click Edit. Windows Home Server opens the file in Notepad.

Tip

If you need to make global changes to the Registry, export the entire Registry and then load the resulting registration file into WordPad or some other word processor or text editor. Use the application’s Replace feature (carefully!) to make changes throughout the file. If you use a word processor for this, be sure to save the file as a text file when you’re done. You can then import the changed file back into the Registry.


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 5 shows two windows. The bottom 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 top window shows the Test key in Notepad as an exported registration file (Test.reg).

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

Note

The file that contains the test Registry code (test.reg) is available on my website at www.mcfedries.com/HomeServerUnleashed3E.


Windows Home Server registration files always start with the following header:

Windows Registry Editor Version 5.00

Tip

If you’re building a registration file for a Windows 9x, Me, or NT 4 system, change the header to the following:

REGEDIT4


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:

Tip

If you want to add a comment to a .reg file, start a new line and begin the line with a semicolon (;).


"SettingName"=identifier:SettingValue

SettingNameThe name of the setting. Note that you use the @ symbol to represent the key’s Default value.
identifierA code that identifies the type of data. REG_SZ values don’t use an identifier, but the other five types do:
 dwordUse this identifier for a DWORD value.
 hex(b)Use this identifier for a QWORD value.
 hexUse 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.
SettingValueThis is the value of the setting, which you enter as follows:
 StringSurround the value with quotation marks.
 DWORDEnter an eight-digit DWORD value.
 QWORDEnter 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

 BinaryEnter the binary value as a series of two-digit hexadecimal numbers, separating each number with a comma.
 Expandable stringConvert 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.
 MultistringConvert 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).

Tip

To delete a setting using a .reg file, set its value to a hyphen (-), as in this example:

Windows Registry Editor Version 5.00


[HKEY_CURRENT_USER\Test]
"BinarySetting"=-

To delete a key, add a hyphen to the start of the key name, as in this example:

Windows Registry Editor Version 5.00


[-HKEY_CURRENT_USER\Test]


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.

Caution

Rename only those keys or settings that you created yourself. If you rename any other key or setting, Windows Home Server might not work properly.


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 (32-bit) Value, QWORD (64-bit) 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.

Caution

Again, to avoid problems, you should delete only those keys or settings that you created. If you’re not sure about deleting a setting, try renaming it instead. If a problem arises, you can return the setting to its original name.

Other -----------------
- SharePoint 2010 : Packaging and Deployment Model - Site Definitions
- SharePoint 2010 : Packaging and Deployment Model - Features (part 3) - Upgrading Features
- SharePoint 2010 : Packaging and Deployment Model - Features (part 2) - Feature Receivers
- SharePoint 2010 : Packaging and Deployment Model - Features (part 1) - Feature Designer
- SharePoint 2010 : Packaging and Deployment Model - Working with Packages
- Microsoft Content Management Server Development : Validating the HtmlPlaceholderControl (part 3) - Building the Required HTML Placeholder Validator
- Microsoft Content Management Server Development : Validating the HtmlPlaceholderControl (part 2) - Checking for an Empty HtmlPlaceholderControl
- Microsoft Content Management Server Development : Validating the HtmlPlaceholderControl (part 1) - Retrieving the Current Value of the HtmlPlaceholderControl
- Windows Server 2003 on HP ProLiant Servers : Migration Case Studies (part 3) - Hewlett-Packard Company
- Windows Server 2003 on HP ProLiant Servers : Migration Case Studies (part 2) - Eastman Chemical Company
- Windows Server 2003 on HP ProLiant Servers : Migration Case Studies (part 1) - County Government Office
- System Center Configuration Manager 2007 : Network Design - Troubleshooting Configuration Manager Network Issues (part 2) - Identifying Network Issues Affecting Configuration Manager
- System Center Configuration Manager 2007 : Network Design - Troubleshooting Configuration Manager Network Issues (part 1)
- System Center Configuration Manager 2007 : Network Design - Network Discovery
- Exchange Server 2007 : Deploying a Cluster Continuous Replication Mailbox Cluster (part 2)
- Exchange Server 2007 : Deploying a Cluster Continuous Replication Mailbox Cluster (part 1)
- Microsoft Dynamic AX 2009 : Report Customization (part 2) - Adding Promotional Materials to an Invoice Report
- Microsoft Dynamic AX 2009 : Report Customization (part 1) - Creating Promotional Materials
- Leveraging the SharePoint Workspace : Edit a List Item Using the Edit Form Offline, Create a New List Item Using the New Form Offline, Synchronize Offline Changes to SharePoint
- Leveraging the SharePoint Workspace : Leveraging the SharePoint Workspace, View Your List and Display Form Offline
 
 
Most view of day
- Microsoft Project 2010 : Setting Up a Project Budget - Reducing Project Costs
- Creating an XPS Document,Scanning a Picture, Scanning Anything
- Microsoft Exchange Server 2007 : Understanding the Client Access Server (part 1) - OWA
- SQL Server 2012 : Running SQL Server in A Virtual Environment - EXTENDED FEATURES OF VIRTUALIZATION
- Microsoft Content Management Server : Preventing Pages with Invalid Content from Being Saved
- Microsoft Dynamics CRM 4 : Digital Phone Integration (part 1)
- Preparing Windows PE : Exploring Windows PE
- Microsoft Dynamic AX 2009 : Working with .NET Business Connector (part 3) - Querying Data Across Companies, Invoking Business Logic
- BizTalk 2010 : WCF LOB SQL Adapter - Consuming ASDK SQL Adapter in Visual Studio (part 1)
- SharePoint 2010 and PowerShell: Real-World Solutions : Scripted Installation of SharePoint 2010 Using Windows PowerShell
Top 10
- Microsoft Project 2010 : Linking Tasks (part 8) - Auditing Task Links,Using the Task Inspector
- Microsoft Project 2010 : Linking Tasks (part 7) - Creating Links by Using the Mouse,Working with Automatic Linking Options
- Microsoft Project 2010 : Linking Tasks (part 6) - Creating Links by Using the Entry Table
- Microsoft Project 2010 : Linking Tasks (part 5) - Creating Links by Using the Task Information Dialog Box
- Microsoft Project 2010 : Linking Tasks (part 4) - Entering Leads and Lags, Creating Links by Using the Menu or Toolbar
- Microsoft Project 2010 : Linking Tasks (part 3) - Using the Start-to-Start Relationship,Using the Finish-to-Finish Relationship
- Microsoft Project 2010 : Linking Tasks (part 2) - Using the Start-to-Start Relationship,Using the Finish-to-Finish Relationship
- Microsoft Project 2010 : Linking Tasks (part 1) - Defining Dependency Links
- Microsoft Project 2010 : Defining Task Logic - Manipulating Your Schedule
- Microsoft Lync Server 2013 : Director Troubleshooting (part 3) - Synthetic Transactions,Telnet
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro