1) I'm assuming by 'registry key' you mean any value/data pair. The 'key' is strictly a container for values (one of which can be the default value). If the key is empty - contains no values and the default value has no data - then Windows Installer deletes the key.
To keep values even after all products installing that value have been uninstalled, mark the component which contains the value as Permanent. This will have the effect of preserving the key path and all the other resources in the component. 2) Declare all the registry values you need. Windows Installer will write all registry values in a Component if the key path for that component needs to be updated. If the key path is a file, the component will be installed if the file is missing, if the file already installed doesn't have a version number and a version number is recorded in the File table, if the file already installed hasn't been modified if no version number is recorded, or if the version in the File table is newer. For registry values, if the key or value is missing or the value data is different from the data in the package, the component is considered out-of-date and Windows Installer will install the whole component (files, registry values, etc, etc). I recommend that you treat registry values that you install as being immutable, changeable only by the next version of your installer. I believe there's a risk that user customizations could be overwritten by repairs or upgrades if installed registry values are edited. Stick to the bare minimum required to allow the components to be located - do the rest in initial program startup. -- Mike Dimmick -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Beyer, Ingo Sent: 25 February 2008 16:42 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Prevent registry key from being removed duringuninstall? AND Only create not existing registry entrieswhile install? Hi all, I've two questions. I tried to solve them by myself, but I cannot find informations in the net... 1) How can I prevent a registry key from being removed during uninstall? 2) What do I have to do, that a only not existing registry entries (some REG_SZ's) will be create during install. Thanks a lot for help! Greetings Ingo ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users