1

I have created installer project in visual studio, Now my task is to add Registry Key of installer And i have done creating Registry key from installer like Right click on installer project -> view -> registry it create Registry Key with provided Name but it add Default Name also in that

Name
(Default)

ABC

Data
(value not set)

c:....\

why (Default) is created i just want ABC

Omkar
  • 15
  • 5

2 Answers2

0

You can create a key in the Registry using the below code. This example adds the value pair, "Name" and "Isabella", to the current user's registry, under the key "Names".

Microsoft.Win32.RegistryKey key;  
key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Names");  
key.SetValue("Name", "Isabella");  
key.Close();

Here is the documentation https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/file-system/how-to-create-a-key-in-the-registry

Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197
0

Why (Default) is created i just want ABC

It's the expected behavior that you see the Name(default) in registry editor.

enter image description here

As I know, there's no registry key that doesn't have that line. Its value can be empty, but that line will always exists.

You can easily check this by creating a new key in Registry Editor, you'll see the default line there.

LoLance
  • 25,666
  • 1
  • 39
  • 73