PDA

View Full Version : overwriting registry keys



prostetnic
09-16-2002, 09:24 AM
I want to change the settings for 2 registry keys that already exist. I am setting everything right as when the keys dont exist they are created. but when they exist already they are not overwritten. anyone tell me how to do this? I have the neveroverwrite property set no. If i right click on the tree the option to install only is always greyed out...

AlaksSevugan
09-26-2002, 06:48 PM
Based on your posting, I'm assuming that you are using Developer to add the registry keys to a component.

In the registry view, you right click on the registry entry to choose Install only and it is greyed out.

Did you need to modify the value for a given key? Windows Installer will create the key, if the key does not already exist and then add the value. If the value already exists, then Windows Installer will update the value. This is the default behavior of Windows Installer.

Could you please explain with an example, so I can better understand the problem.

thanks
alaks

prostetnic
10-01-2002, 08:16 AM
hello again :) you must be hating me by now ;)

okay. the registry key is under hklm/system/services/netbt/parameters/EnableDNS i am turning it on. i.e set to 1 (it is 0 on a standard install)

Later on when i uninstall the changed package i need it to reset. it just deletes the key. NT doesn't seem to like that :)

I can get it to leave the key alone on uninstall, but i want it to reset it. is this possible or am i just gonna have to live with it?

The package i am installing uses updated dns server locations..not wins compatible, bit confusing..

AlaksSevugan
10-01-2002, 10:23 AM
Now I understand the problem.

Windows Installer will not reset the value for a registry on uninstall. If you need to reset the key to an old value, you need to run a custom action on Uninstall to reset the value to the old value.

prostetnic
10-02-2002, 06:05 AM
okay, thanks for the help. Now working fine :) that was what i meant by wasn't sure it was possible.. Nice one.