Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate post-processing tasks with MSIX Hero CLI #78

Closed
marcinotorowski opened this issue Jan 25, 2021 · 3 comments
Closed

Automate post-processing tasks with MSIX Hero CLI #78

marcinotorowski opened this issue Jan 25, 2021 · 3 comments
Assignees
Labels
CLI enhancement New feature or request new feature
Milestone

Comments

@marcinotorowski
Copy link
Owner

A comment from https://msixhero.net/documentation/command-line-interface-cli-reference/:

Feature request: it would be very helpful to extend MSIXHeroCLI.exe functionality with enabling file addition, removal, and update in MSIX packages. Another useful extension would be unattended manifest update. This could significantly enhance and simplify exaction of various post-processing tasks, such as PSF integration.

@marcinotorowski
Copy link
Owner Author

This has been requested by many other users, in a similar fashion to what MSIX Tweaker does.

@marcinotorowski
Copy link
Owner Author

marcinotorowski commented Nov 15, 2021

Files

  • delete file by path
  • replace file
  • add file (same as replacing)

Registry

  • Remove registry key / value
  • Set registry key / value
  • Import registry from .REG file

PSF

  • Inject PSF - for future
  • Remove PSF - for future

Manifest

  • Update identity (publisher, name, version, archiecture)
    • Auto-increment / auto-generate / coerce
  • Set display names, logo, publisher etc.
  • Set/remove build metadata
  • Add application entry (by executable from the package), remove application - for future
  • Add/remove dependency - for future
  • Add capability (removing capability - for future)

XPath / XML

  • Add element / attribute by xpath - for future
  • Remove element / attribute by xpath - for future
  • Set attribute via xpath - for future

For future (not editing)

  • List entry points (taking PSF and other launchers into consideration) - for future
  • Calculate family name - for future

marcinotorowski added a commit that referenced this issue Nov 17, 2021
* Add option -x to unpack and pack CLI commands
* Ability to disable validation for unpacking
* Streamlined command line definition
marcinotorowski added a commit that referenced this issue Dec 9, 2021
marcinotorowski added a commit that referenced this issue Dec 9, 2021
marcinotorowski added a commit that referenced this issue Dec 10, 2021
This adds a new verb "edit" which can be used to automate
typical actions executed on MSIX, manifests and extracted packages.
@marcinotorowski
Copy link
Owner Author

Basic functionalities have been implemented.
Usage:

msixherocli.exe edit <path-to-msix-or-directory-or-manifest> <edit-command>

Where <edit-command> could be either any of supported commands (see help) or a verb list which enables bulk editing.

Use cases:

  • To simply edit a file and persist the changes, use the basic syntax. The package is saved after each call to msixherocli.exe (whether MSIX, directory or a manifest)
  • To execute many actions but load and save only once, do one of the following three options:
    • Unpack the package with unpack verb to a temporary, then do any changes with the CLI tool, PowerShell or even manual editing. Finally, pack the package again using the pack verb.
    • Use the basic command msixherocli.exe edit <path-to-msix> list. This will open an interactive mode, in which the commands can be entered line by line (for example: addCapability runFullTrust).
    • You can also specify the path to a text file containing your commands.
  • Use --help switch to find some more information on every verb and parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI enhancement New feature or request new feature
Projects
None yet
Development

No branches or pull requests

1 participant