Hi, I'm recording user selection/deselection of various components, installdir etc in an ini file with the iniFileSet action. This is written to an ini file in user's home directory to provide a one-stop location for all user selections in all our applications.

    <setInstallerVariable name="ini_file" value="${user_home_directory}/InstallBuilderInstall.ini"/>
    <iniFileSet>
        <file>${ini_file}</file>
        <key>installdir</key>
        <section>${product_fullname}-settings</section>
        <value>${installdir}</value>
    </iniFileSet>
</postInstallationActionList>

I see that when I uninstall product the corresponding entries are not being deleted from the .ini file. Is there a setting to have these entries removed on uninstall. I realize I could setup individual ini files within each product and remove them upon uninstall, but I'd like to keep a single ini for all prodcuts.

Thanks, Reddy

asked 08 Apr '13, 15:51

laxmireddy's gravatar image

laxmireddy
1202020
accept rate: 0%


Unfortunately InstallBuilder does not provide action to remove values from an INI file. However, you can set the unused values to empty strings.

For example (please note addition of persist="1" to keep the variable value for uninstaller:

<postInstallationActionList> <setInstallerVariable name="ini_file" value="${user_home_directory}/InstallBuilderInstall.ini" persist="1" /> <iniFileSet> <file>${ini_file}</file> <key>installdir</key> <section>${product_fullname}-settings</section> <value>${installdir}</value> </iniFileSet> </postInstallationActionList> <postUninstallationActionList> <iniFileSet> <file>${ini_file}</file> <key>installdir</key> <section>${product_fullname}-settings</section> <value></value> </iniFileSet> </postUninstallationActionList>

link

answered 09 Apr '13, 06:59

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×54
×2

Asked: 08 Apr '13, 15:51

Seen: 972 times

Last updated: 09 Apr '13, 06:59