Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Installing Other Components


3 replies to this topic

MeInstall

MeInstall
  • Members
  • 2 posts

Posted 15 December 2001 - 02:19

I have the following problem:

1.  I have several installation options some using components, some using XCopy, and some using both. (Some of these options overlap-some of the same files may be installed by different options).

2.  After running one option the user may want to run a different option on the same machine.

3.  I need InstallShield to leave all the existing files (the contents of these files may have changed after they were installed, so they cannot be deleted) on the machine and install the files associated with the new option.  I need this to work for both my XCopy installs and my component style installs.

I have tried using:
if (MAINTENANCE = TRUE) then
    ComponentReinstall();
endif;

Combined with OnFirstUIBefore();

Without any luck.  Please help!


Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 15 December 2001 - 23:04

To start, it sounds like you'll need to save off the user's original choices and silently re-select them in order for IS not to remove the previously installed files.

You'll also want to make sure you don't allow newer files to be overwritten since you said their contents may have changed.

(Edited by TacoBell00 at 5:10 pm on Dec. 17, 2001)


MeInstall

MeInstall
  • Members
  • 2 posts

Posted 17 December 2001 - 22:01

Does anyone have any specific idea how to do this?

lasenbby

lasenbby
  • Members
  • 744 posts

Posted 17 December 2001 - 23:24

Your first choice is the easiest.  Place a message on the component selection dialog that tells the user (that the state of the machine after the install is what they are really selecting for and) that unselected components are uninstalled if already installed.

The second option.  In maintenance mode, the default is what was installed last.  So for your user selected components, create booleans and use componentisitemselected to see which ones are defaulted.  Then let the user pick and afterwards go through and check the unselected ones to see if they were previously selected (if the boolean is set for that component).  If it is then you need to force select that unselected component using componentselectitem.

Your file groups overwrite property is the key.  If you have it set to overwrite if newer then on an overinstall, if the files are the same they will not be overwritten.  I personally like same or newer version/date because this will overwrite if the versions are the same; which will fix a corrupted file.

You may have to do manual cleanup on uninstall because it sounds like you may be installing a file one or more times; this will set the "created" property in the log file to no and it will not be removed.  Not sure as I always do a manual cleanup because I don't trust IS will do it neatly.