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

Expose more settings to Microsoft.WinGet.DSC/WinGetPackage #3401

Open
rlabrecquefsg opened this issue Jul 2, 2023 · 4 comments
Open

Expose more settings to Microsoft.WinGet.DSC/WinGetPackage #3401

rlabrecquefsg opened this issue Jul 2, 2023 · 4 comments
Labels
Command-Configure Issue related to WinGet Configuration DSC-Resource Issue related to DSC Resources Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@rlabrecquefsg
Copy link

Description of the new feature / enhancement

I'm migrating over to winget configure from my bespoke winget install scripts, and am running into some missing features in WinGetPackage. This is a request to expose more of winget install and Install-WinGetPackage's settings via Microsoft.WinGet.DSC/WinGetPackage so they can be used with winget configure, and devhome.

Notably missing --custom and --scope for my needs.
I imagine some people would require --location and --architecture, and --override to make use of this feature as well.

For my current needs these only need to be set during install/upgrade.

In the long term it would be nice to have Microsoft.WinGet.DSC/WinGetPackage go down the re-install/upgrade path if say the location, scope, or custom/override settings change. But this should be a seperate ticket once both this ticket and #3281 are complete!

Sorry @denelon, you knew this was coming😄

Proposed technical implementation details

Adding more settings here:
https://github.com/microsoft/winget-cli/blob/e4b9205cff88701b2ad1078dd8ed311ac716b8b6/src/PowerShell/Microsoft.WinGet.DSC/Microsoft.WinGet.DSC.psm1#L545C12-L549C14

Like so: https://github.com/microsoft/winget-cli/blob/master/src/PowerShell/Microsoft.WinGet.Client/Examples/Sample_InstallPackage.ps1#L25

@rlabrecquefsg rlabrecquefsg added the Issue-Feature This is a feature request for the Windows Package Manager client. label Jul 2, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Jul 2, 2023
@stephengillie stephengillie removed the Needs-Triage Issue need to be triaged label Jul 3, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Command-Configure Issue related to WinGet Configuration label Jul 7, 2023
@denelon denelon added this to the 1.8 Client milestone Aug 24, 2023
@denelon
Copy link
Contributor

denelon commented Aug 24, 2023

Yep 👍 I knew it was coming.

The goal here would be to essentially provide parity with the CLI in the DSC resource in terms of arguments you can pass to ensure a package is installed.

We'll have to make a laundry list for all the arguments that make sense.

@denelon denelon modified the milestones: 1.8 Client, v1.7 Client Oct 12, 2023
@denelon denelon added this to WinGet Jan 3, 2024
@egerlach
Copy link

Just ran into a use case for --installer-type in my configuration.

@denelon denelon modified the milestones: v1.7 Client, v.Next-Client Feb 27, 2024
@OranguTech
Copy link

Lack of --scope makes this a non-starter for us.

@denelon
Copy link
Contributor

denelon commented Jan 24, 2025

Another bug we need to address with this is the scenario where an older version of WinGet with an expired certificate for the "msstore" causes the configuration to fail when building the composite source. Those users can remove the "msstore" source, but since the DSC resource is specifying "winget" as the source for the package, it shouldn't worry about trying to connect to the "msstore" source (or any other source for that matter).

When the source is specified in the configuration, it should be treated as a "targeted" source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Configure Issue related to WinGet Configuration DSC-Resource Issue related to DSC Resources Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
Status: To Do
Development

No branches or pull requests

5 participants