Create Registry Key Default Value
Ok, there is something I am missing here. I'm creating a registry key in my installation project for the install path. This works great... except that I need my string value name to be the default in the registry. So, if I look in my registry, I have (default) with no value and Path with my value. How do I fill in that (default)?
Re: Create Registry Key Default Value
try this. it changes the default value in the windows calculator section of the registry in vista x64. the method is the same for any default registry value:
vb Code:
Dim rk As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
Dim regShell As Microsoft.Win32.RegistryKey = rk.OpenSubKey("Software\Microsoft\Calc", True)
regShell.SetValue("", your value here)
Re: Create Registry Key Default Value
Quote:
How do I fill in that (default)?
You dont. That (Default) value is only there as a legacy thing, you shouldnt ever need to do anything with it. If you want to store something in the registry then create your own value for it, I dont see why you would want to stick it in the default value (which isnt actually named "(default)" - that is just the name that regedit shows you)
Re: Create Registry Key Default Value
Paul, thanks so much for replying. That's good info but I was hoping to do it during installation. More ideas or is there not a way? Chris, my company has a program reading app paths from the registry. A great deal of existing app paths only have a default value and nothing else so it's reading the default value. Seems there are a great deal of installs out there that are filling in that default value or default would never have a value. I wanted to make sure my program was following suit with the already existing entries in my registry.