The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,269 other subscribers

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:

  1. [Wayback/Archive] To Do List and Task Management App | Microsoft To Do
  2. [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:

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-agreements parameter for package level agreements.
There is an --accept-source-agreements parameter for source level agreements.
These are listed in help for the command winget upgrade -?
Link to Microsoft Docs for upgrade command: https://docs.microsoft.com/windows/package-manager/winget/upgrade
One 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:

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-agreements I’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 + R shortcut, type ms-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:
  1. Either of these:
    • From the CLI run start ms-windows-store:, or
    • from the task bar press Win+R followed by typing ms-windows-store: and the Enter key, or
    • on the task bar search for Store, then click Microsoft Store:
      image
  2. In the title bar, click on the profile icon (it looks like a very abstract person icon, similar to “ጰ”):
    image
  3. From the pop-up menu, choose “Sign in”
    image
  4. The sign on dialog appears:
    image
  5. Enter credentials, for instance begin with email, then press “Next”:
    image
  6. then password, then press “Sign in”:
    image
  7. 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)
    image
  8. If the abstract person icon has changed into your account initials (in my case “WM”), then you are set:
    image
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

This site uses Akismet to reduce spam. Learn how your comment data is processed.