I need to block certain packages from being installed based on the items in the package. If a Sitecore item in the package matches a certain condition then the package should not be installed. I have tried using the packageinstall:items:starting event as this has a reference to all the items in the package.

I tried setting SitecoreEventArgs.Result.Cancel to true or throwing an exception in this event. However in either case the items in the package are still getting installed. Is there a different way to achieve this?

  • Have you considered using Sitecore PowerShell Extensions? You can use that to build dialogs and even inspect packages. Perhaps using SPE scripts you can determine whether a package is eligible for installation. Apr 8 '20 at 21:49
  • 2
    You're turning a user problem into a software problem
    – Mark Cassidy
    Apr 8 '20 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.