cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hina1703
Level 3

Maintenance mode

Which event sets InstallScript, the MAINTENANCE variable to FALSE for a first-time installation, and TRUE for maintenance mode or uninstallation? How InstallShield determines a way to set it.
Which event sets value of system variable, MAINTENANCE?
Labels (1)
0 Kudos
(4) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

In the simplest terms, MAINTENANCE is set to TRUE if there is an uninstall key for an InstallScript project in the registry that points to a valid InstallScript log file on the machine (typically in C:\Program Files\InstallShield Installation Information\{ProductCode}).
0 Kudos
hina1703
Level 3

But which event checks for that file? I am trying to create installer which uninstalls the product if installed already and then should proceed as a first time install. It uninstalls successfully but then
enters maintenance mode.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The InstallScript log file is opened by internal engine code before any script code is run. The MAINTENANCE variable is then initialized by an internal script function that is called prior to any events.

Regarding the behavior you are trying to obtain, it would be recommended that the product code for the project be changed, which will result in a new product being installed. Then, the old product can be removed by launching its uninstall string.
0 Kudos
hina1703
Level 3

Thanks for the reply 🙂
0 Kudos