cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nnjcsc
Level 6

How to export a string used for later uninstall???

I have a user entry that I want to use later in an uninstallation. The user entry is stored in a global string declaration and used throughout my installation. My uninstallation does not remember that string but I need the string for my uninstallation. How?

I'm using InstallScript.
Labels (1)
0 Kudos
(5) Replies
RobertDickau
Flexera Alumni

Perhaps look into using LogWriteCustomString during installation and LogReadCustomString during uninstallation?
0 Kudos
nnjcsc
Level 6

Thanks. I solved my problem. The string I needed to export was the name of an instance of a multi instance installation. I assigned that name to IFX_MULTI_INSTANCE_SUFFIX. InstallShield remembers what is in IFX_MULTI_INSTANCE_SUFFIX during the uninstallation. So all I had to do was use that variable in the uninstallation and it worked. Hope this info helps someone else someday.
0 Kudos
nnjcsc
Level 6

LogWriteCustomString() may not solve my issue. According to the documentation:

"LogWriteCustomString cannot write data to the maintenance/uninstallation section of the log file (that is, the section where the setup automatically writes data, such as the files that are installed and the registry entries that are created, and from which it automatically reads data during maintenance or uninstallation). "
0 Kudos
RobertDickau
Flexera Alumni

The documentation might just be saying that LogWriteCustomString puts custom data in a separate area from the file/registry/etc. data; I seem to recall that using LogWriteCustomString during installation and then opening the .ilg file with the log file viewer showed the special location used for custom strings...
0 Kudos
nnjcsc
Level 6

That worked. I added LogWriteCustomString() to the end of my OnFirstUIBefore, then called LogReadCustomString() in my uninstall function and... presto.... the string I needed showed up. Thanks Robert.
0 Kudos