When you create a registry key and a value in a Visual Studio Setup project, the value for the registry key may be empty when you install the application on a computer (906765)



The information in this article applies to:

  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Academic Edition

SYMPTOMS

When you create a registry key and a value in a Microsoft Visual Studio Setup project, the value for the registry key may be empty when you install the application on a computer. This issue may occur if you use the Registry Editor in Microsoft Visual Studio 2005 or in Microsoft Visual Studio .NET to create the registry key for the project.

CAUSE

This issue occurs if the left bracket ([) character is the first character in the Value field in the Visual Studio Registry Editor.

RESOLUTION

To resolve this issue, use the Formatted data type to format the value. For example, to create a value of [ABC] for a registry key, type the following in the Value field in the Visual Studio Registry Editor:

[\[]ABC[\]]

MORE INFORMATION

Steps to reproduce the issue

  1. In Visual Studio 2005 or in Visual Studio .NET, create a new Setup project.
  2. On the View menu, point to Editor, and then click Registry.
  3. Expand HKEY_LOCAL_MACHINE.
  4. Right-click Software, point to New, and then click String Value.
  5. Type Test, and then press ENTER.
  6. Click Test, and then type [ABC] in the Value field of the Properties window.
  7. Compile the project.
  8. Install the application on a computer.
  9. Verify that the value for the following registry key is empty:

    HKEY_LOCAL_MACHINE\Software\Test

REFERENCES

For more information about how to use the Formatted data type, visit the following Microsoft Developer Network (MSDN) Web site:

Modification Type:MajorLast Reviewed:10/6/2005
Keywords:kbDev kbtshoot kbcode kbprb KB906765 kbAudDeveloper