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

How to detect Modify mode in InstallScript

I just need to verify, but I can't find the information anywhere else on the internet.  Will "if (!MODIFY)..."  work to prevent a part of my script from running when in Modify mode, or does the MODIFY variable mean something else?  I want the code to run in Repair mode, so I don't want to use  "if (!MAINTENANCE)..."

Does anyone know where these modes are documented for InstallScript?

Labels (1)
0 Kudos
(1) Reply
SpiderLily1
Level 6

I determined that "if (!MODIFY)" doesn't work.  My problem is this.  I am installing some .ini files for launchers, and they contain some lines with substrings that must be updated according to user installation selections.  I have a function that does this perfectly.  It locates the strings in all the .ini files and updates them, leaving the rest of each line intact, because the rest of the lines are different, depending on which .ini file it is.

When I run this on initial install, it works perfectly.  I have no problems when I uninstall.  Repair mode replaces the .ini files, then my function updates them, so there's no problem there.

However, when Modify mode is run, substrings are duplicated, so the strings make no sense, and the application launchers do not work. 

My OnMoveData contains the FeatureTransferData call, followed by function calls according to mode.  Is there no way to differentiate when we are running Modify, as opposed to Repair?????

if (!MAINTENANCE) then
   // do initial install stuff
   UpdateInis();
elseif ( REMOVEALLMODE || REMOVEONLY) then
   // do cleanup stuff
else
   // must be Repair or Modify modes
   // Want to call UpdateInis(), but only if it is Repair mode!!! 

0 Kudos