Relevant area(s)
COM API
Description of the new feature / enhancement
CatalogPackage currently exposes IsUpdateAvailable, which only indicates whether a newer version has an applicable in-place update path.
Please add support to identify reinstall-required updates, where a newer version exists but cannot be upgraded in place and instead requires uninstall + reinstall. A typical example is installer technology mismatch.
This would let API consumers distinguish between:
- No newer version exists
- A newer version exists and is updateable
- A newer version exists but is reinstall-required
Without this distinction, API consumers cannot reliably guide users toward the correct remediation path.
Proposed technical implementation details
Add two new properties to CatalogPackage:
IsReinstallAvailable (Boolean)
ReinstallRequiredReason (enum)
Keep IsUpdateAvailable semantics unchanged.
Suggested enum values
None
InstallerTechnologyMismatch
InstalledTypeMismatch
InstalledScopeMismatch
Other
Expected behavior
-
Applicable update exists
IsUpdateAvailable = true
IsReinstallAvailable = false
ReinstallRequiredReason = None
-
Newer version exists, but in-place update is blocked by installer technology mismatch
IsUpdateAvailable = false
IsReinstallAvailable = true
ReinstallRequiredReason = InstallerTechnologyMismatch
-
Newer version exists, but is blocked by non-reinstall constraints
For example: OS version, architecture, market, or other general applicability constraints.
IsUpdateAvailable = false
IsReinstallAvailable = false
ReinstallRequiredReason = Other (or None, depending on final API design)
-
No newer version exists
IsUpdateAvailable = false
IsReinstallAvailable = false
ReinstallRequiredReason = None
Suggested implementation approach
The relevant implementation path appears to be:
RepositoryCore applicability selection
-> COM projection
-> CatalogPackage properties
Concrete areas:
- Extend the result returned by repository-side version selection so it can carry:
- latest applicable version
- update availability
- reinstall availability
- reinstall reason
- Reuse existing installer applicability analysis and mismatch classification already used during upgrade selection.
Potential implementation points:
src/AppInstallerRepositoryCore/Public/winget/PackageVersionSelection.h
src/AppInstallerRepositoryCore/PackageVersionSelection.cpp
src/AppInstallerCommonCore/Public/winget/ManifestComparator.h
src/Microsoft.Management.Deployment/PackageManager.idl
src/Microsoft.Management.Deployment/CatalogPackage.h
src/Microsoft.Management.Deployment/CatalogPackage.cpp
Compatibility requirements
- Do not change existing IsUpdateAvailable behavior.
- Add new properties in a backward-compatible COM contract version.
- Preserve existing callers that only understand update vs no-update.
Acceptance criteria
- Existing
IsUpdateAvailable behavior remains backward compatible.
- Reinstall-required scenarios are reported deterministically.
- The reason enum is documented and stable.
- API contract versioning remains backward compatible.
- Tests cover:
- update available
- reinstall available
- neither available
Relevant area(s)
COM API
Description of the new feature / enhancement
CatalogPackagecurrently exposesIsUpdateAvailable, which only indicates whether a newer version has an applicable in-place update path.Please add support to identify reinstall-required updates, where a newer version exists but cannot be upgraded in place and instead requires uninstall + reinstall. A typical example is installer technology mismatch.
This would let API consumers distinguish between:
Without this distinction, API consumers cannot reliably guide users toward the correct remediation path.
Proposed technical implementation details
Add two new properties to
CatalogPackage:IsReinstallAvailable(Boolean)ReinstallRequiredReason(enum)Keep
IsUpdateAvailablesemantics unchanged.Suggested enum values
NoneInstallerTechnologyMismatchInstalledTypeMismatchInstalledScopeMismatchOtherExpected behavior
Applicable update exists
IsUpdateAvailable = trueIsReinstallAvailable = falseReinstallRequiredReason = NoneNewer version exists, but in-place update is blocked by installer technology mismatch
IsUpdateAvailable = falseIsReinstallAvailable = trueReinstallRequiredReason = InstallerTechnologyMismatchNewer version exists, but is blocked by non-reinstall constraints
For example: OS version, architecture, market, or other general applicability constraints.
IsUpdateAvailable = falseIsReinstallAvailable = falseReinstallRequiredReason = Other(orNone, depending on final API design)No newer version exists
IsUpdateAvailable = falseIsReinstallAvailable = falseReinstallRequiredReason = NoneSuggested implementation approach
The relevant implementation path appears to be:
Concrete areas:
Potential implementation points:
src/AppInstallerRepositoryCore/Public/winget/PackageVersionSelection.hsrc/AppInstallerRepositoryCore/PackageVersionSelection.cppsrc/AppInstallerCommonCore/Public/winget/ManifestComparator.hsrc/Microsoft.Management.Deployment/PackageManager.idlsrc/Microsoft.Management.Deployment/CatalogPackage.hsrc/Microsoft.Management.Deployment/CatalogPackage.cppCompatibility requirements
Acceptance criteria
IsUpdateAvailablebehavior remains backward compatible.