Uninstall addins before primary program

bobzbobz
Beiträge: 125
Registriert: 30 Nov 2012, 10:41
Wohnort: Denmark

Uninstall addins before primary program

Beitragvon bobzbobz » 27 Jun 2017, 08:25

Hi

I have a package for office 2016 and several packages for addins for different office-programs.

I want the addins to be uninstalled before Office it self is uninstalled - I have tried adding this to the control-file for Office:

Code: Alles auswählen

[ProductDependency]
action: uninstall
requiredProduct: mailarchiver_office2016
requiredAction: uninstall
requirementType: before


When I try to run uninstall on Office it starts with the main Office package in stead of the addins.
What can be done?

Regards
Soren
Regards,
Soren


Please help others by sharing your scripts on the OPSI-Wiki.

Benutzeravatar
r.roeder
uib-Team
Beiträge: 450
Registriert: 02 Jul 2008, 10:08

Re: Uninstall addins before primary program

Beitragvon r.roeder » 27 Jun 2017, 10:02

Hi Soren,

it is not so clearly documented but: Up to now the only dependencies which influences the product sequence are between setup actions resp. installed status since the product sequence is conceived as product installation sequence, and we would run into contradictions if we tried to follow both kinds of dependency declarations. It is already a typical case which you describe: Some addon B must be installed after its parent product A. but should possibly be uninstalled before A. Therefore we get two contradictory sequences for uninstallation and installation but we need a unique sequence.

To solve this problem we have indeed got the idea to produce an uninstall sequence of products and a installation sequence of products (and possibly each product may appear twice).

At the moment, you can handle your task by using opsiservicecalls in your opsiscript to force the other product to be uninstalled (cf. http://download.uib.de/opsi4.0/doc/html ... erviceCall )

I hope this is helpful

Greetings
Rupert
opsi support - uib gmbh
For productive opsi installations we recommend maintainance + support contracts which are the base of opsi development.


Wondering who's using opsi? Have a look at the opsi map: http://opsi.org/opsi-map/.

bobzbobz
Beiträge: 125
Registriert: 30 Nov 2012, 10:41
Wohnort: Denmark

Re: Uninstall addins before primary program

Beitragvon bobzbobz » 27 Jun 2017, 10:59

Thank you for the quick reply :)

Can you point me in the right direction for which method I should use?
I have only used OpsiServiceCalls one time before, to set another program to install based on a dependency.

shade
Beiträge: 48
Registriert: 10 Aug 2012, 15:14

Re: Uninstall addins before primary program

Beitragvon shade » 16 Aug 2017, 22:18

:?:

Benutzeravatar
n.wenselowski
uib-Team
Beiträge: 3148
Registriert: 04 Apr 2013, 12:15

Re: Uninstall addins before primary program

Beitragvon n.wenselowski » 17 Aug 2017, 12:15

Hi,

setProductActionRequest sets the action request but you need to handle the pausing of the currently processed product yourself.
We do this in some other packages by saving state in the registry to then determine at what stage we are.


Kind regards

Niko
opsi development - uib gmbh
For productive opsi installations we recommend support contracts.