Skip to content

dism resource: add sourcePath parameter to allow for offline feature installs#1561

Open
Alex-shearing wants to merge 18 commits into
PowerShell:mainfrom
Alex-shearing:optionalfeaturesource
Open

dism resource: add sourcePath parameter to allow for offline feature installs#1561
Alex-shearing wants to merge 18 commits into
PowerShell:mainfrom
Alex-shearing:optionalfeaturesource

Conversation

@Alex-shearing
Copy link
Copy Markdown

@Alex-shearing Alex-shearing commented Jun 5, 2026

To allow Windows optional features and feature on demand installs on Windows computers without internet access, the source paramter must be accessible to supply offline resources.

This is available as the 'Source' paramter in:

The changes include:

  • Add sourcePath property to Microsoft.Windows/FeatureOnDemandList and Microsoft.Windows/OptionalFeatureList schemas
  • Add the source_paths paramter to enable_feature and add_capability functions in dism.rs
    • This paramter is passed into the add_capability/enable_feature DISM functions
  • Resource reference docs updated to include new parameter

@Alex-shearing Alex-shearing marked this pull request as ready for review June 5, 2026 10:37
Copilot AI review requested due to automatic review settings June 5, 2026 10:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for specifying DISM sourcePaths when enabling optional features/capabilities, enabling offline/alternate source installation scenarios.

Changes:

  • Extend OptionalFeatureList/FeatureOnDemandList inputs/outputs with an optional sourcePaths array.
  • Validate sourcePaths in set handlers and pass them into DISM calls.
  • Update resource schemas and docs to document the new property and examples.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
resources/dism_dsc/src/optional_feature/types.rs Adds source_paths field to OptionalFeatureList model.
resources/dism_dsc/src/optional_feature/set.rs Validates/passes source_paths into enable operation; includes in output.
resources/dism_dsc/src/optional_feature/get.rs Includes source_paths in Get output payload.
resources/dism_dsc/src/optional_feature/export.rs Sets source_paths: None in Export output.
resources/dism_dsc/src/feature_on_demand/types.rs Adds source_paths field to FeatureOnDemandList model.
resources/dism_dsc/src/feature_on_demand/set.rs Validates/passes source_paths into add capability; includes in output.
resources/dism_dsc/src/feature_on_demand/get.rs Includes source_paths in Get output payload.
resources/dism_dsc/src/feature_on_demand/export.rs Sets source_paths: None in Export output.
resources/dism_dsc/src/dism.rs Extends DISM FFI calls to pass SourcePaths/SourcePathCount.
resources/dism_dsc/optionalfeature.dsc.resource.json Adds sourcePaths to resource schema.
resources/dism_dsc/featureondemand.dsc.resource.json Adds sourcePaths to resource schema.
resources/dism_dsc/locales/en-us.toml Adds localized error string for invalid source path.
docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md Documents sourcePaths and updates links.
docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md Adds example using offline source.
docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md Documents sourcePaths and adds link.
docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/install-remove-feature-on-demand.md Adds example using offline source.

Comment thread resources/dism_dsc/src/dism.rs Outdated
Comment thread resources/dism_dsc/src/optional_feature/set.rs Outdated
Comment thread resources/dism_dsc/src/feature_on_demand/set.rs Outdated
Comment thread resources/dism_dsc/src/optional_feature/get.rs Outdated
Comment thread resources/dism_dsc/locales/en-us.toml Outdated
@Alex-shearing Alex-shearing marked this pull request as draft June 5, 2026 10:46
@Alex-shearing Alex-shearing marked this pull request as ready for review June 5, 2026 11:16
@Alex-shearing Alex-shearing requested a review from Copilot June 5, 2026 11:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.

Comment thread resources/dism_dsc/src/dism.rs Outdated
Comment thread resources/dism_dsc/src/optional_feature/get.rs Outdated
Comment thread resources/dism_dsc/src/feature_on_demand/get.rs
Comment thread docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md Outdated
Comment thread resources/dism_dsc/src/optional_feature/get.rs Outdated
@Alex-shearing Alex-shearing requested a review from Copilot June 5, 2026 11:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Comment thread resources/dism_dsc/src/optional_feature/types.rs
Comment thread resources/dism_dsc/src/feature_on_demand/types.rs
Comment thread resources/dism_dsc/src/optional_feature/set.rs
Comment thread resources/dism_dsc/src/dism.rs
Comment thread resources/dism_dsc/src/optional_feature/get.rs
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.

2 participants