PDA

View Full Version : Major Upgrade registry entries



lonewolf32
04-08-2002, 01:09 PM
How can I configure a major upgrade to not overwrite changed registry values?

This is the way I do it, although I feel it is a hack:

- Use Installscript to write registry values, first by checking to see if it is present, and not overwriting it if it is.



if (RegDBGetKeyValueEx
( szKey, "CfgPath", nvType, svStrValue, nvSize ) < 0) then
RegDBSetKeyValueEx( szKey, "CfgPath", REGDB_STRING, szOsiDir, -1 );
endif;


- Disable(LOGGING) around that part of the script so the Major Upgrade doesn't uninstall those changed registry values.

Of course if the user wants to uninstall my product it won't remove my registry parameters so I suppose I could write some more script for uninstall...

Can't IS just HANDLE this situation? Why can't I use the IDE to hold my registry entries? Why is there no option to "NOT REMOVE/NOT OVERWRITE" registry entries during a major upgrade?

Dave

lonewolf32
04-11-2002, 12:04 PM
I figured out how to do this. Attach those registry entries to a component, then in the component view, make the component "Permanent" and "No Overwrite". That does the trick.

Of course, now the registry entries never leave the system, even when the user specifically uninstalls the program for good...