Skip to content

Improved manifest validations for MSI and Windows Feature names#6169

Merged
JohnMcPMS merged 8 commits into
microsoft:release-v1.28from
JohnMcPMS:msi-validations
Apr 22, 2026
Merged

Improved manifest validations for MSI and Windows Feature names#6169
JohnMcPMS merged 8 commits into
microsoft:release-v1.28from
JohnMcPMS:msi-validations

Conversation

@JohnMcPMS
Copy link
Copy Markdown
Member

@JohnMcPMS JohnMcPMS commented Apr 22, 2026

Change

Adds some additional validation for MSI switches and Windows Feature names:

  1. MSI switches are checked during full manifest validation in the same way that they are checked when we attempt to use the MSI APIs rather than msiexec. The API is used for fully all silent installs of MSIs, so we now ensure that those will work (6 total manifests in winget-pkgs were found that needed fixes).
  2. Windows Feature names in dependencies are validated to be { alphanumeric, -, _ }. This is done both during full manifest validation and at runtime.

Validation

A PowerShell script (tools/ManifestValidation/Invoke-ManifestValidation.ps1) is added that will run wingetdev validate against a directory recursively and generate a report. There is support for resuming in the middle of the run. This would probably perform much better if it were updated to use the WinGetUtil API, but that can be a future project.

The script was run against the entire winget-pkgs repository to ensure no significant impact, and the few manifests that were found will be fixed.

Unit tests are added.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner April 22, 2026 18:03
@github-actions

This comment was marked as outdated.

@Trenly
Copy link
Copy Markdown
Contributor

Trenly commented Apr 22, 2026

@JohnMcPMS - I thought most of that spelling was already fixed; is your branch behind master?

@JohnMcPMS JohnMcPMS merged commit c25b662 into microsoft:release-v1.28 Apr 22, 2026
4 checks passed
@JohnMcPMS JohnMcPMS deleted the msi-validations branch April 22, 2026 18:58
JohnMcPMS added a commit that referenced this pull request Apr 23, 2026
CP of #6169 onto main branch.

## Change
Adds some additional validation for MSI switches and Windows Feature
names:

1. MSI switches are checked during full manifest validation in the same
way that they are checked when we attempt to use the MSI APIs rather
than msiexec. The API is used for fully all silent installs of MSIs, so
we now ensure that those will work (6 total manifests in winget-pkgs
were found that needed fixes).
2. Windows Feature names in dependencies are validated to be {
alphanumeric, `-`, `_` }. This is done both during full manifest
validation and at runtime.

A PowerShell script
(tools/ManifestValidation/Invoke-ManifestValidation.ps1) is added that
will run `wingetdev validate` against a directory recursively and
generate a report. There is support for resuming in the middle of the
run. This would probably perform much better if it were updated to use
the WinGetUtil API, but that can be a future project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants