Skip to content

[FEATURE REQUEST] Pre-install 'hook' #2193

Closed

Description

@tushev

Please confirm these before moving forward

  • I have searched for my feature proposal and have not found a work-in-progress/duplicate/resolved/discarded issue.
  • This proposal is a completely new feature. If you want to suggest an improvement or an enhancement, please use this template

Describe the new feature

A section in settings:

  • Checkbox: Enable pre-install hook
  • Label: A command to execute before installation of each package"
  • Text field: Path to executable + parameters
  • Checkbox: Do not proceed with package installation if command's exit code is different from 0
  • Description of variables that end-user can use inside text field:
    • $PackagePath: Path to newly downloaded package
    • $PackageID: ID of the Package
    • $InstallSystemType: winget/pip/scoop/etc
    • $NewVersion
    • $OldVersion

Describe how this new feature could help users.

This feature will allow advanced users to implement complex custom scenarios without having to request features from UnigetUI:

  • custom malware scan before installation
  • backing up packages to remote storage
  • sending notifications
  • custom logging
  • handling restart of service Y if package X updates
  • delaying updates for certain packages when required (i.e., via in-house API)
  • etc, etc

Activity

  1. added
    new-feature
    on May 4, 2024
  2. marticliment commented on Jun 20, 2025

    @marticliment
    Collaborator

    Hello,

    I have published a PreRelease version of UniGetUI that allows to specify pre/post install/update/uninstall commands/scripts. I'd appreciate if you could test it and provide some feedback.

    Thanks!
    Download link: 3.2.1-beta1 (release)

  3. tushev commented on Jul 3, 2025

    @tushev
    Author

    Hi Martí Climent (@marticliment)

    Thanks a lot!

    I've tested beta2 version, as portable. I love it, thanks!

    I noticed a tiny bug that clicking on 'Go to security settings' does not work. (if that's relevant, I tries to update a package that I skipped in 'main(stable, non-portable)' UniGetUI). Also, IMO the command fields could be larger (take the full row instead of a half row) - it will be easier to see and read them without scrolling.

    Also, I think it would be logical to put a tiny cheatsheet or a link there - the one that describes custom command line argument placeholders ($PackagePath, $PackageID, $InstallSystemType, $NewVersion, $OldVersion - if these are implemented, sorry, did not test them).

    Another idea: maybe, it's worth adding an icon into package list indicating that this package install options are customized.

    Thanks again!

  4. marticliment commented on Jul 3, 2025

    @marticliment
    Collaborator

    I have fixed the bug where navigation button wouldn't work, I will see what I can do regarding the other suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

new-featureready-to-go

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions