Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Maintenance mode causes difficulties


6 replies to this topic

robinm

robinm
  • Members
  • 3 posts

Posted 07 December 2001 - 14:15

This may be a dumb question, if so my apologies. I am fairly new to IS6, having used IS5 for a few years and only recently upgraded. I have found that this maintenance system causes me problems.

Basically most of our installations unlock different components based on the serial number the user has been issued. For instance you could install the main program with no optional sub-components, the main program with some extra stuff, or just any of the sub-components on their own - all depending on what serial number we've given you. So previously with my IS5 based scripts you could run the installation more than once, adding new things that you've paid for later.
I always assumed this was quite common.

However, now with my new IS6 script the maintenance mode kicks in whenever you run the setup a second time so you can't run the through the original installation again and enter different codes for extra stuff, which I really need users to be able to do.

Anyone got any suggestions?

(Edited by robinm at 1:22 pm on Dec. 7, 2001)


lasenbby

lasenbby
  • Members
  • 744 posts

Posted 07 December 2001 - 19:41

What you can do if rewrite the uninstall string to have a signaling command line param that tells the install that it really is an uninstall run from the add/remove pgms applet.  Then in onmaintuib call onfirstuib if the command line param is not there.   Then return when control is passed back to onmaintuib.  You will have to call componentreinstall so file xfer doesn't remove files.  Also, you are going to have problems with components that are not selected the second time but were the first time because they will be removed.  You need to check what was installed previously (will be the default and can check with componentisitemselect before letting them pick or the license determines which get installed).  Then after the component determination, check the booleans what were previously set and if it is not set, set them with componentselectitem.  This way they will be reinstalled (if component overwrite property is same or newer; not removed if property is newer) not uninstalled.  In onmaintuia call onfirstuia with the return if it is not an real uninstall.

(I hope you are using event driven instead of a program block or you are going to have all kinds of problems.  I know they say it works but...)

There is a discussion on this site about overridding maint mode that may be of help.


Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 07 December 2001 - 19:43

Sounds like you current script is an event-based model as opposed to the older program-based model.  This is what's causing these OnMaintUI calls to be made on the 2nd+ run.

From my month and half of experience, I'd say basiclaly have two choices:
1. Go back to a program-based model like in 5.x by adding a program block to your code and just referring to the OnFirstUI calls.

2. Define you own MaintUICalls which simply call OnFirstUI.  That way it always behaves the same.

I'm sure there are other possibilities, but these are the main things which come to mind.


robinm

robinm
  • Members
  • 3 posts

Posted 13 December 2001 - 16:58

Thankyou very much for the suggestions guys, I'm still working on it .

Bill K

Bill K
  • Members
  • 21 posts

Posted 13 December 2001 - 19:16

There is a great posting on this site here which explains in detail how to accomplish just that.
It is is IS5/6 Tools & Tips - Documentation - Avoid Maintanence Mode in IS 6.  You can cut and paste the code and be on your way in minutes.

robinm

robinm
  • Members
  • 3 posts

Posted 14 December 2001 - 15:36

What a nightmare.

Bill K thanks for the pointer, I should've found that myself hehe. I've now got it working fine - uninstalling from the CP or the uninstall shortcut, and rerunning the installation otherwise.

However the stuff lasenbby mentioned above has now come to my attention. Why the #### does IS6 remove files from the target machine if you rerun the setup and those components aren't selected the second time?

Should I create a text file during the setup with a list of the components being installed every time it's run, so I can invisibly reselect them next time the setup is run to avoid them being removed??
There are quite a few components, so it'd be quite a  pain to check each one to see if it's selected (after the SdComponentDialog) and write an ini file key for each or something, and then check each key in the ini file next time the setup is run in order to select those components again!

Is there an easier way? Can this automatic removal be disabled? Or is there a way of getting a list of all selected components easily?


Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 14 December 2001 - 16:31

Yeah, the removal of unselected components is a pain, but unfortunately that's the default behavior and there's no way to override it.

Also, I don't believe there's an easier solution to remembering the selected components, so you're out of luck there too.  Sorry.