[wix-users] Prevent removing ini values ONLY during the UNINSTALL
Shubham Jain
shubhamjain1713 at gmail.com
Tue Mar 7 04:04:02 PST 2017
Hi Tigran,
Please check the below link. It may help you.
https://blogs.technet.microsoft.com/alexshev/2008/
04/03/from-msi-to-wix-part-15-installable-items-ini-files/
Best Regards,
Shubham Jain
On Tue, Mar 7, 2017 at 4:04 AM, Tigran Galoyan <tigran.galoyan at gmail.com>
wrote:
> 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
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
More information about the wix-users
mailing list