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

Fix EnableWindowsPackageManagerCommandLineInterfaces Policy Behavior #4293

Merged
merged 5 commits into from
Mar 21, 2024

Conversation

ryfu-msft
Copy link
Contributor

@ryfu-msft ryfu-msft commented Mar 21, 2024

Credit to @JohnMcPMS for initial implementation and guidance.

There is an issue where if the EnableWindowsPackageManagerCommandLineInterfaces policy is disabled, all COM calls would be blocked. This PR fixes that behavior by moving the CLI policy check to CoreMain in the CLICore project so that it only performs the check if being executed from the command line and unblocks COM calls.

Verified manually using the updated SampleUWPCaller. Also added E2E tests to check this behavior.

Microsoft Reviewers: Open in CodeFlow

@ryfu-msft ryfu-msft requested a review from a team as a code owner March 21, 2024 00:07
@ryfu-msft ryfu-msft marked this pull request as draft March 21, 2024 00:22
Copy link
Member

@JohnMcPMS JohnMcPMS left a comment

Choose a reason for hiding this comment

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

I would prefer that we not throw an exception as control flow, but I can live with it.

@ryfu-msft ryfu-msft marked this pull request as ready for review March 21, 2024 18:04
@ryfu-msft ryfu-msft merged commit 88cd81e into microsoft:master Mar 21, 2024
8 checks passed
@ryfu-msft ryfu-msft deleted the fixGPcheckForCom branch March 21, 2024 18:05
ryfu-msft added a commit to ryfu-msft/winget-cli that referenced this pull request Mar 25, 2024
@selimfelex
Copy link

Hello @Madhusudhan-MSFT , @ryfu-msft could you please advise when this fix will be released, and will it require an update to the Intune management engine ?

@makroground
Copy link

Deploying Intune Store Apps still failing with error "blocked by policy", if EnableWindowsPackageManagerCommandLineInterfaces policy is set. Tested with v1.7.11261 and also with v1.8.1133 in preview. Any news regarding this still existing issue @JohnMcPMS @ryfu-msft?

@yao-msft
Copy link
Contributor

yao-msft commented Jun 3, 2024

Intune distributes a copy of winget binaries with their client release. The fix will be available in Intune client 2406 release (to be released end of June).

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.

5 participants