PDA

View Full Version : How to export a string used for later uninstall???



nnjcsc
03-17-2008, 03:16 PM
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.

RobertDickau
03-17-2008, 04:39 PM
Perhaps look into using LogWriteCustomString during installation and LogReadCustomString during uninstallation?

nnjcsc
03-17-2008, 04:58 PM
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.

nnjcsc
03-18-2008, 10:01 AM
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). "

RobertDickau
03-18-2008, 10:04 AM
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...

nnjcsc
03-18-2008, 12:46 PM
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.