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

Allow winget to install MS Store packages without account #2095

Merged
merged 10 commits into from
Apr 26, 2022

Conversation

zachcwillson
Copy link
Contributor

@zachcwillson zachcwillson commented Apr 14, 2022


  • Updates comment when enr.Status() == GetEntitlementStatus::NoStoreAccount to indicate it is okay to not have a store account.
  • Updates the return statement of GetFreeUserEntitlement to return true if enr.Status() == GetEntitlementStatus::NoStoreAccount
Microsoft Reviewers: Open in CodeFlow

zachcwillson and others added 2 commits April 13, 2022 20:54
update log message for NoStoreAccount and add or check for return statement to return true for GetFreeUserEntitlement if status was no store account
Fix formatting and return statement
@ghost ghost added the Issue-Feature This is a feature request for the Windows Package Manager client. label Apr 14, 2022
@zachcwillson zachcwillson marked this pull request as ready for review April 14, 2022 16:03
@zachcwillson zachcwillson requested a review from a team as a code owner April 14, 2022 16:03
@JohnMcPMS
Copy link
Member

We've been told that we should call GetFreeDeviceEntitlementAsync. I would assume that this would be in response to a GetEntitlementStatus::NoStoreAccount from the user function, or simply called first.

Address feedback around usage of GetFreeDeviceEntitlementAsync, moved state checking logic to its own method
@zachcwillson
Copy link
Contributor Author

Thanks for the tip @JohnMcPMS :)

Update to make logging clear over which entitlement type failed or succeeded
@ghost ghost added the Needs-Author-Feedback Issue needs attention from issue or PR author label Apr 14, 2022
@ghost ghost removed the Needs-Author-Feedback Issue needs attention from issue or PR author label Apr 15, 2022
Copy link
Contributor Author

@zachcwillson zachcwillson left a comment

Choose a reason for hiding this comment

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

addressed feedback

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zachcwillson
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 2095 in repo microsoft/winget-cli

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

context.Reporter.Info() << Resource::String::MSStoreInstallGetEntitlementNoStoreAccount << std::endl;
AICLI_LOG(CLI, Error, << "Get entitlement failed. No Store account.");
AICLI_LOG(CLI, Error, << "Get device entitlement.");
result = installManager.GetFreeUserEntitlementAsync(productId, winrt::hstring(), winrt::hstring()).get();
Copy link
Contributor

Choose a reason for hiding this comment

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

User

Device

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

Not sure how to drop my "request changes" without approving. I agree with the code parts, just a few log lines that are mistargeted.

@JohnMcPMS
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yao-msft yao-msft merged commit 7355518 into microsoft:master Apr 26, 2022
@alexchandel
Copy link

Did this not make it into 22H2?

@yao-msft
Copy link
Contributor

yao-msft commented Feb 1, 2023

Did this not make it into 22H2?

This is included in winget v1.3 stable release and later. Though winget is pre-installed in Windosw, all updates are distributed through Microsoft Store. They are available in our Github releases too https://github.com/microsoft/winget-cli/releases

@alexchandel
Copy link

So when will a version of winget be pre-installed on Windows that doesn't require an account at first use? Windows 12?

@denelon
Copy link
Contributor

denelon commented May 3, 2023

@alexchandel Windows has a long release cycle. We do check in the "latest" stable version of WinGet into the OS for the next release, but it's often the case that a newer version is available by the time the OS is available to the public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow winget to install MS Store packages without account just like the MS Store
5 participants