Quantcast
Channel: Flexera Community Forums
Viewing all articles
Browse latest Browse all 4553

Force Feature to install if condition is met during major upgrade

$
0
0
I'm trying to add the ability to out upgrade process to configure the system for a test environment vs production if a certain file is present in the system (for ease of the testers). I am not having much luck in getting this to work. This is a for a major upgrade wrapped in a setup.exe.

  • I first tried setting the feature to conditionally install but if the feature wasn't install during the full install, it won't attempt to install during the major upgrade. I've tried a variety of different options but it has not worked yet.
  • I'm now trying to use a custom action to force it to install by using vbscript
    Code:

    Session.FeatureRequestState("Test_Environment") = 3
    . That is generation application errors during the install and I'm not seeing much in the way of doing it other than how I'm currently doing it.


I'm looking for any advice on how to accomplish this since I'm still learning about all the bells/whistles of installshield.

fwiw, here's my entire script
Code:

Option Explicit

Function isGoodStr(x)
  isGoodStr = False
  If vbString = VarType(x) Then
    If 0 < Len(x) Then
        isGoodStr = True
    End If
  End If
End Function

If isGoodStr(Session.Property("TESTINSTALL")) Then
        Session.FeatureRequestState("Test_Environment") = 3
End If

This script runs synchronously/Immediate Execution. I have it configured to run After ValidateProuctID and I've tried also doing it right before CostFinalize

This is the current error I'm receiving when running the install
Code:

MSI (s) (34:3C) [10:26:36:990]: Doing action: SetTestEnvForInstall
Action ended 10:26:36: ValidateProductID. Return value 1.
MSI (s) (34!3C) [10:26:37:600]: Note: 1: 2731 2: 0
Action start 10:26:36: SetTestEnvForInstall.
MSI (s) (34:5C) [10:27:53:240]: Product: New Leaf Rx -- Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action SetTestEnvForInstall script error -2147467259, Msi API Error: FeatureRequestState,Feature Line 13, Column 2,

Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action SetTestEnvForInstall script error -2147467259, Msi API Error: FeatureRequestState,Feature Line 13, Column 2,
Action ended 10:27:53: SetTestEnvForInstall. Return value 3.
Action ended 10:27:53: INSTALL. Return value 3.


Note: If I try to set the install level to 0 per the remarks for FeatureRequestState, that line will bomb with a similar error

Viewing all articles
Browse latest Browse all 4553

Trending Articles