With the right hint of Ann Walter (aka 'awello'), I could find a solution:
from Products.CMFCore.utils import getToolByName def myMethod(context): qi = getToolByName(context, 'portal_quickinstaller') prods = qi.listInstallableProducts(skipInstalled=False) for prod in prods: if (prod['id'] == 'your.productname') and (prod['status'] == 'new'):
For some reason and, fortunately, the product status during reinstallation will be returned “uninstalled”, products not yet installed will be returned with the status “new” and, finally, already installed site runs shout loudly and proudly: 'installed'.
In this way, reinstallation can be distinguished from the initial installation.
source share