Installing the Microsoft To Do app from the Microsoft Store on Windows via the CLI was impossible at first, and requires GUI configuration
Posted by jpluimers on 2023/09/07
I prefer installing applications through the CLI (command-line interface). This way, things can be scripted and installation parameters be stored under version control.
A few months back I published Different ways for installing Windows features on the command line – Peter Hahndorf which wrote way earlier and amended with a few highlights I learned from unsuccessfully trying to Microsoft To Do. Of course that is possible from the GUI by following these links:
- [Wayback/Archive] To Do List and Task Management App | Microsoft To Do
- [Wayback/Archive] Get Microsoft To Do: Lists, Tasks & Reminders – Microsoft Store
But I don’t want GUI, I want CLI as that is way easier to automate than GUI. I knew this should theoretically be possible from my the above winget post.
Putting this to practice however at first failed. Later I found a GUI-based workaround. So this was not possible purely on the CLI.
This post is both a summary of the most important bits and a reminder for myself to check if installing Microsoft Store via [Wayback/Archive] Winget without a Microsoft Store account is still impossible (as when downloading via the GUI from the Microsoft Store site an account is not needed).
winget
First however on how I ended up at winget for anyway were these posts:
- Reminder to self: check to see the state of winget and if it is possible to install Windows Store applications from the command-line
- Need to take a look a Scoop (as a long time Chocolatey user)
- Need to rethink which Windows package managers to use
The first was affirmed in my wget post I mentioned above which also included how to accept usage terms for the Microsoft Store:
[Wayback/Archive] winget aggresively now prompts to accept terms unnecessarily · Discussion #1536 · microsoft/winget-cli
@nascentt, there is an--accept-package-agreementsparameter for package level agreements.There is an--accept-source-agreementsparameter for source level agreements.These are listed in help for the commandwinget upgrade -?Link to Microsoft Docs for upgrade command: https://docs.microsoft.com/windows/package-manager/winget/upgradeOne you have accepted a source agreement, you shouldn’t be prompted again unless the source agreement changes.
Hope
This was good news, especially combined with [Wayback/Archive] Package Request: Microsoft To Do · Issue #1744 · microsoft/winget-pkgs that already got closed in May 2020 because of the resolution at [Wayback/Archive] Install Microsoft Store Apps · Issue #117 · microsoft/winget-cli
This feature was released in github.com/microsoft/winget-cli/releases/tag/v1.1.12653 [Wayback/Archive].
However there was also this form my above winget post:
- [Wayback/Archive] Allow `
winget` to install MS Store packages without account just like the MS Store · Issue #1585 · microsoft/winget-cli- This workaround no longer works:[Wayback/Archive] How do I install an app from Windows Store using Powershell – Server Fault
as of: 06/25/2021 this is broken.
Download-AppxPackageno longer works.
Despair
Early 2022, I hoped the above limitation was history, so I tried. And failed:
C:\temp>winget install --accept-source-agreements --accept-package-agreements 9NBLGGH5R558 Found Microsoft To Do: Lists, Tasks & Reminders [9NBLGGH5R558] Version Unknown This package is provided through Microsoft Store. winget may need to acquire the package from Microsoft Store on behalf of the current user. Version: Unknown Publisher: Microsoft Corporation Publisher Url: https://go.microsoft.com/fwlink/?linkid=846683 Publisher Support Url: https://go.microsoft.com/fwlink/?linkid=846682 Description: Got something on your mind? Get Microsoft To Do. Whether you want to increase your productivity, decrease your stress levels, or just free up some mental space, Microsoft To Do makes it easy to plan your day and manage your life. With Microsoft To Do, you can: • Stay focused with My Day, a personalized daily planner with suggested tasks • Get your lists anywhere, on any device • Share lists and assign tasks with your friends, family, colleagues, and classmates • Personalize your lists with bold and colorful backgrounds • Set one-time or recurring due dates and reminders • Break your tasks into manageable steps • Add notes to any task • Attach files up to 25 MB to any task • Sync your tasks between Outlook and To Do • Group your lists together by topic or project Whether it's for work, school, or home, To Do helps you organize and simplify your plans. To Do is free and available on all your devices. Learn more: https://to-do.microsoft.com Follow us on Twitter: @MicrosoftToDo Need support? https://microsoft-todo.helpshift.com By installing Microsoft To Do, you agree to the Microsoft Terms of Use: https://go.microsoft.com/fwlink/?linkid=842575 License: https://go.microsoft.com/fwlink/?linkid=842576 Privacy Url: https://privacy.microsoft.com/privacystatement Copyright: © Microsoft Corporation Agreements: Category: Productivity Pricing: Free Free Trial: No Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction Seizure Warning: https://aka.ms/microsoft-store-seizure-warning Store License Terms: https://aka.ms/microsoft-store-license Verifying/Requesting package acquisition... Verifying/Requesting package acquisition failed: no store account found
I knew I could bump into this, though I was hopeful it had been fixed while writing this in March 2022, but my above blog post was still accurate:
[Wayback/Archive] powershell – Bypass option for winget for “no store account found” – Stack Overflow (thanks [Wayback/Archive] Alymsin, [Wayback/Archive] marsze and [Wayback/Archive] Suirtimed):
Q
I’m trying to install Sysinternals for our computers remotely, but when attempting to install with
winget install sysinternals --accept-source-agreements --accept-package-agreementsI’m getting “Verifying/Requesting package acquisition failed: no store account found”I can go into the Microsoft Store directly to install it and it asks me if I want to sign in or use “No Thanks” to install, which then works, but this isn’t what I’m intending to do, I don’t want to go to each machine to do this. I could probably try the other method of installing through PowerShell from here serverfault.com/questions/1018220/how-do-i-install-an-app-from-windows-store-using-powershell, but this again, is not what I’m intended.
A
This isn’t supported yet (as of January 2022). There is an open issue at GitHub: github.com/microsoft/winget-cli/issues/158
Reminder to self
So the current blog post is a reminder to myself to verify if this has been resolved yet.
Temporary workaround
For now, I have created a burner Microsoft Store account for installing these kinds of applications.
Then I bumped into another problem: how to configure winget to use that burner account.
That appears to be impossible: you have to configure this in the Microsoft Store App. After asking around, I first figured out how to start the Microsoft Store from the CLI via [Wayback/Archive] open microsoft store from command line – Google Search:
[Wayback/Archive] How to open Microsoft Store apps from Command Prompt? – Auslogics blog
- Press the
Win+Rshortcut, typems-windows-store:and press “Enter”- In the Command Prompt window, type “
start ms-windows-store:” (without quotes) and then press the “Enter” key.
Then I posted full steps in [Wayback/Archive] How to associate winget with a Microsoft Store account? · Discussion #1992 · microsoft/winget-cli:
No problem and thanks, it works!Full steps to logon with a Microsoft account on the Microsoft Store app of your Windows 10 machine:
- Either of these:
- In the title bar, click on the profile icon (it looks like a very abstract person icon, similar to “ጰ”):
- From the pop-up menu, choose “Sign in”
- The sign on dialog appears:
- Enter credentials, for instance begin with email, then press “Next”:
- then password, then press “Sign in”:
- finally choose if you want to use this account for everything on your Windows installation (“Next” button) or just the Microsoft Apps (“Microsoft apps only” hyperlink)
- If the abstract person icon has changed into your account initials (in my case “WM”), then you are set:
Back on the CLI you can now install an application that in the Windows Store does not use an account, but winget requires to have one, in my case it was Microsoft To Do:winget install --accept-source-agreements --accept-package-agreements 9NBLGGH5R558
Now installation works
Install log:
C:\temp> winget install --accept-source-agreements --accept-package-agreements 9NBLGGH5R558 Found Microsoft To Do: Lists, Tasks & Reminders [9NBLGGH5R558] Version Unknown This package is provided through Microsoft Store. winget may need to acquire the package from Microsoft Store on behalf of the current user. Version: Unknown Publisher: Microsoft Corporation Publisher Url: https://go.microsoft.com/fwlink/?linkid=846683 Publisher Support Url: https://go.microsoft.com/fwlink/?linkid=846682 Description: Got something on your mind? Get Microsoft To Do. Whether you want to increase your productivity, decrease your stress levels, or just free up some mental space, Microsoft To Do makes it easy to plan your day and manage your life. With Microsoft To Do, you can: • Stay focused with My Day, a personalized daily planner with suggested tasks • Get your lists anywhere, on any device • Share lists and assign tasks with your friends, family, colleagues, and classmates • Personalize your lists with bold and colorful backgrounds • Set one-time or recurring due dates and reminders • Break your tasks into manageable steps • Add notes to any task • Attach files up to 25 MB to any task • Sync your tasks between Outlook and To Do • Group your lists together by topic or project Whether it's for work, school, or home, To Do helps you organize and simplify your plans. To Do is free and available on all your devices. Learn more: https://to-do.microsoft.com Follow us on Twitter: @MicrosoftToDo Need support? https://microsoft-todo.helpshift.com By installing Microsoft To Do, you agree to the Microsoft Terms of Use: https://go.microsoft.com/fwlink/?linkid=842575 License: https://go.microsoft.com/fwlink/?linkid=842576 Privacy Url: https://privacy.microsoft.com/privacystatement Copyright: © Microsoft Corporation Agreements: Category: Productivity Pricing: Free Free Trial: No Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction Seizure Warning: https://aka.ms/microsoft-store-seizure-warning Store License Terms: https://aka.ms/microsoft-store-license Verifying/Requesting package acquisition... Verifying/Requesting package acquisition success Starting package install... ██████████████████████████████ 100% Successfully installed C:\temp>
–jeroen














Leave a comment