I absolutely love Microsoft’s built-in package manager WinGet. But occasionally things happen when updating application that it can’t (or won’t) handle. As you can see in the lead-in graphic, it cheerfully discloses in red that Discord “…cannot be upgraded using winget.” Indeed, its own built-in update facility did nothing to get me to version 1.0.9165. Thus, my only shot at a WinGet Discord update end-around was the tried-and-true uninstall-reinstall maneuver. That worked, as you can see…
Why Use a WinGet Discord Update End-Around?
Short answer: because it worked. Apparently, it’s uninstaller is smart enough to leave user account information alone. Even though I uninstalled the old version and then installed the new one, it carried over anyway. I’d been worried I’d have to set accounts back up, but no. Everything came up as it should’ve even after an “out-with-the-old, in-with-the-new” operation had completed.
I’m counting myself lucky in this case. There are plenty of other applications that don’t ask if you want to keep personal, account and config info. Then they cheerfully wipe all that stuff out as part of the uninstall process. That makes getting back to where one started a little more time-consuming, especially when a reinstall requires account, password, and possibly even other information to complete.
What’s with Discord’s Pinned Status Anyway?
Notice my attempts to unpin Discord reported “There is no pin for package Discord” (line 7 in the intro graphic). In the past, WinGet has often reported it can’t update Discord because the app is pinned. That’s an experimental feature in WinGet that prevents ordinary syntax for updates from working on certain apps.
Contrary to expectations, though, Discord wasn’t pinned. Yet WinGet couldn’t update it, either. Because the built-in updater didn’t do anything when I tried it (right-click on the notification area icon, then select “Check for updates…” in the resulting pop-up menu), I didn’t have a lot of other options. Thus, I’m grateful that the remove-replace approach did the trick. As you can see from the name of the package downloaded, I did wind up with version 1.0.9165. That’s just what I wanted.
Good thing one can sometimes get lucky here in Windows-World. Glad to have this behind me with no apparent ill effects.
I think I’ve figured out why WinGet can initially install Discord, and even uninstall it, but can’t update/upgrade it after Discord has updated itself:
It has to do with how Discord handles versions. Discord installs itself to %LocalAppData%\Discord\, or C:\Users\InsertUserNameHere\AppData\Local\Discord\ in my case (sanitized for privacy). But there’s a twist: when you click the icon for Discord, you’re actually launching “…\Discord\Update.exe –processStart Discord.exe” which starts in folder “…\Discord\app-x.y.zzzz” or “…\Discord\app-1.0.9169” at this time of writing. So you’re actually launching an updater executable that checks for a new version, installs if one exists and updates the pointer to the new version folder (including the Desktop / Start menu shortcut), then launches the (newest) main Discord executable.
I assume it’s this indirect, program version-based folder structure that’s confusing WinGet upgrade, but still allows it to uninstall/reinstall. As to why your login info stays, it must be stored outside of the %LocalAppData%\Discord\ folder.
I’m investigating a workaround to have WinGet correctly update, but so far the above information and your uninstall/reinstall workaround are all I have. Let me know if you find a more elegant, streamlined solution! Hope this helps,
Shane Allen
As an aside, Chris Titus’ WinUtil is a powerful frontend for PowerShell that has a menu chock-full of apps that can be serviced by WinGet, but the utility has many other functions to help Windows power users. The tool can be found on his website at https://christitus.com/windows-tool/ Bear in mind that that page was last updated 2 1/2 years ago, and the tool has advanced since then, it’s under constant development. Directly on that page it describes how to quickly create a shortcut that will point to a script (I believe?) on his website that will then launch the utility on your PC. I won’t put that info here because everyone should investigate it for the sake of security, since it’s launching Windows PowerShell (as an Admin) and therefore is potentially risky. You can check out the open source on GitHub at https://github.com/ChrisTitusTech/winutil Do your homework, but it’s legit and I use it!
Shane Allen
Thanks for sharing. I need to try this out myself. Good find!
-Ed-