[wix-users] Prevent removing ini values ONLY during the UNINSTALL

Tigran Galoyan tigran.galoyan at gmail.com
Mon Mar 6 14:34:13 PST 2017


Hi,

I'm having trouble making this work:

*<Directory Id="INIDIR" Name="Ini">*

*<Component Id="Ini" Guid='780D972E-66AE-4B24-A548-C108C26B0F6A' >*

*<CreateFolder />*
*...*
*<IniFile Id="IniID" Action="removeLine" Key="InstallDir" Name="My.ini"
Section="Paths" Directory="INIDIR"/>*
*...*

*</Component>*

*</Directory>*

When I *INSTALL *the InstallDir key/value pair entry is removed from the
existing My.ini file if it exists there. However, during *UNINSTALL *all
other INI parameters are also removed from My.ini file and apparently it
also deletes the file itself. Then I added the following:

*<InstallExecuteSequence>*

*<RemoveIniValues Suppress="yes">(NOT UPGRADINGPRODUCTCODE) AND
(REMOVE="ALL")</RemoveIniValues>*

*</InstallExecuteSequence>*

It helps by preventing the removal of all my INI entries during uninstall,
however, my removeLine action declaration in order to remove a
particular INI setting no longer works, as removal of INI settings is
suppressed, even though I explicitly put a condition to suppress INI value
removal only for uninstall, still it affects install as well.

Any help is much appreciated.

Thanks,
Tigran


More information about the wix-users mailing list