It's very convenient to access installer variables during the installations. When the installation is finished, these variables are saved in uninstall.dat file. Is it possible to access/modify these variables after the installation is completed?

asked 21 Nov '11, 12:09

GigaG's gravatar image

GigaG
419911
accept rate: 0%


The format of uninstall.dat file is internal and it is not possible to read and/or modify the values of the InstallBuilder variables from it. However, you can store the files as INI or XML files. For example:

<postInstallationActionList>
  <iniFileSet>
    <file>${installdir}/variables.ini</file>
    <key>installdir</key>
    <section>Variable</section>
    <value>${installdir}</value>
  </iniFileSet>
  <iniFileSet>
    <file>${installdir}/variables.ini</file>
    <key>datadir</key>
    <section>Variable</section>
    <value>${datadir}</value>
  </iniFileSet>
  <addFilesToUninstaller>
    <files>${installdir}/variables.ini</files>
  </addFilesToUninstaller>
</postInstallationActionList>

This way you can store the values you want to access from your application.

You may also read some of the variables by doing:

<preUninstallationActionList>
  <iniFileGet>
    <file>${installdir}/variables.ini</file>
    <key>datadir</key>
    <section>Variable</section>
    <variable>datadir</variable>
  </iniFileGet>
</preUninstallationActionList>

This way the application can read and write the variables and installer will read the values before uninstallation and running actions related to uninstallation.

link

answered 22 Nov '11, 07:03

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:

×155
×41

Asked: 21 Nov '11, 12:09

Seen: 1,298 times

Last updated: 22 Nov '11, 07:03