PDA

View Full Version : running Custom action in maintenance only



DLee65
10-17-2006, 07:05 PM
I have a custom action that I want to only run in Maintenance mode. So I added the conditions for its execution as:

Installed And REMOVE<>"ALL"

Now, I thought that would work. However, in a multi-user environment, the CA InstallScript code executes and pops up a message box erroneously. What is happening is that setup is starting up to write all necessary user information and thus the Custom Action triggers. I do not want the Custom action to trigger for this type of maintenance, only for Maintenance > Repair, Maintenance > Modify.

So what is the correct syntax for this scenario? Any ideas?

MichaelU
10-18-2006, 11:07 AM
Perhaps this is a matter of conflicting ideas of what "maintenance" is. It sounds like you're describing a scenario of AutoRepair installing per-user information for an additional user. This is a form of maintenance, at least in terms of how most properties will look. I haven't tested this, but if you mean to only run during explicitly requested maintenance, perhaps you could try a condition like Reinstall="ALL" (or maybe REINSTALL instead of Reinstall)?

DLee65
10-18-2006, 12:47 PM
Exactly. My custom action is to prevent a user from upgrading the program (there are three product level tiers for a single application) in maintenance mode if the main application is running or if the database manager app is running.

So during AutoRepair for a new user first time launch, this code does not need to run since the app is not upgrading.

So perhaps I have to move the code to check for the app running to a different loctation, perhaps make it part of the script that performs the application upgrade.

I will try the Reinstall="ALL" option as a condition for the custom action first.

Sairen
10-19-2006, 10:32 AM
There's a variable _IsMaintenance that you might be able to use... it's set to either "Remove" "Change" or "Repair" (I think) ... use that with "AND Installed" maybe?