Page 1 of 1
Disable Maintainance mode
Posted: Thu Feb 10, 2011 8:36 am
by penfold
Hi,
I am trying to disble the installer from running maintenance mode via the script under my control such that the second time I start the installer it always goes through an installation. There are situations however where I want maintence mode enabled as normal.
Thanks
Re: Disable Maintainance mode
Posted: Thu Feb 10, 2011 8:37 am
by penfold
woops missed the question..
How can I control this from the script?
Re: Disable Maintainance mode
Posted: Thu Feb 10, 2011 4:42 pm
by giaviv
Dear penfold,
You could either alter your MSIcode and add If blocks and Go To Label commands that control the flow of your installer, or you could manually set the value of the MAINTENANCE variable.
Re: Disable Maintainance mode
Posted: Fri Feb 11, 2011 4:08 am
by penfold
Hi,
The answer you have given is a bit vague. Are you saying after the apply install, I should
"SET MAINTAINANCE = TRUE or FALSE" as required. I have tried not doing the apply, didnt work, I have tried terminating the install after the bit I need doing etc.. didnt work.
I need to stop the second iteration, in control panel from thinking it was installed or not showing it at all, there must be a file or something stored on the system that tells the installer it has already been installed? BUT still perform a very small part of the installation, i.e. extract a couple of files based on the customer settings. Unless there is a copy function that is not under the control of the installer? I have to call apply install otherwise the installfiles function does not perform its actions?
I know this is strange, but that is what is required.
Thanks
Re: Disable Maintainance mode
Posted: Fri Feb 11, 2011 10:20 am
by giaviv
Dear penfold,
I am not entirely sure what you are trying to do. Basically, I understand that you want to be aware when the second time of your installer has run? In that case, you could write a registry value that increments every time your installer runs. Then, you could check that value in your script at runtime to determine if that value equals 2. If it this, or in other words, you are inside the second run of the installer, you can manually change the MAINTENANCE var to FALSE, and by doing so, the maintenance code will not get executed. Am I understanding you correctly?
Re: Disable Maintainance mode
Posted: Mon Feb 14, 2011 11:17 am
by penfold
Cheers thanks that gives me some idea. I have used an installed driver file to detect if its been fully installed. If its not present then I assume a re-install. Was hoping to have some more fine grained control on the first install, so that the installer wasnt present in control panel under this condition, so there would be no need to manually detect the installation status, and also set something so that it always considered the install as new.
Thanks
Steve
Re: Disable Maintainance mode
Posted: Thu Feb 17, 2011 7:19 am
by giaviv
Dear penfold,
You could also use the Is MSI Setup Installed command (instead of writing a physical file to the drive). Are you familiar with this command?