Skip to content

Add error when using dism resources via Appx - #1479

Merged
Steve Lee (SteveL-MSFT) merged 1 commit into
PowerShell:mainfrom
SteveL-MSFT:dism-appx
Apr 11, 2026
Merged

Add error when using dism resources via Appx#1479
Steve Lee (SteveL-MSFT) merged 1 commit into
PowerShell:mainfrom
SteveL-MSFT:dism-appx

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

PR Summary

There is a known issue with Appx that prevents access to dism APIs. So if the error returned indicates the class is not registered, tell the user it is not supported.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a targeted, user-friendly error for a known limitation where DISM APIs aren’t accessible when the resource is installed via Appx, surfacing a clearer failure mode during session initialization.

Changes:

  • Detect REGDB_E_CLASSNOTREG from DismInitialize and DismOpenSession and return a dedicated localized error.
  • Add a new dism.notSupportedAppx localized string for the new error path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
resources/dism_dsc/src/dism.rs Adds HRESULT check for REGDB_E_CLASSNOTREG during DISM initialization/session open and returns a localized “not supported via Appx” error.
resources/dism_dsc/locales/en-us.toml Adds the notSupportedAppx message used by the new error path.

Comment thread resources/dism_dsc/locales/en-us.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants