winget-cli
winget-cli copied to clipboard
Office upgrade does not work
Brief description of your issue
I have the following package which is listed twice when entering winget upgrade: Microsoft 365 Apps for enterprise [Microsoft.Office] Version 16.0.14527.20234
Every time I enter winget upgrade --all I have the following problem: When winget tries to update the 2 office packages, a window is displayed which is black and has no output but the office icon. After 2-3 min the update probably completes because the window disapears and winget moves on.
After entering winget upgrade the Microsoft 365 Apps is still displayed in the list of upgradeable packages. Maybe the updater for office could be improved as well. (Not only a black window) I also noticed that when I open a Office App and check the version from within the app it displays that it is up to date. So it appears that it is only updated because I use winget.
Steps to reproduce
Install Microsoft Office for Enterprise. execute winget upgrade --all
Expected behavior
The Office packages should be updated.
Actual behavior
The feedback of the update process is bad (black window). After the update it is still listed as upgradable in winget.
Environment
Windows Package Manager v1.1.12986
Windows: Windows.Desktop v10.0.19043.1288
Paket: Microsoft.DesktopAppInstaller v1.16.12986.0
Couple things:
- What version of Office do you currently have installed? (
winget list Microsoft.Office
will tell you if you're not sure). - What channel are you currently getting Office updates from? It should be next to the about
button in Office: - Did you originally install Office via winget or via another method (and what method was that)? It shouldn't matter, but ODT is fickle sometimes so it might rule some things out.
The Microsoft.Office package does launch a "blank window" and silently installs. It takes quite a while on my machines as well. It looks like there may be another installer or another version of an Office bootstrapper on the machine. I would also be interested in the output @jedieaston mentioned. We've got some new changes coming with our manifest schema to hopefully help eliminate these "near misses" with multiple packages that are similarly identified.
Every language of ProPlus you install will have its own item in the list of installed programs, thats how Windows and thus Geek Uninstaller for instance sees it too. So multilanguage installs maybe triggers this behavior? Just a guess.%
Yes, we're really frustrated with the state of winget being pushed by default with every win 11 installation, and we'll have to support this dumpster fire that is this package manager.
Meanwhile, winget PMs are happily getting their christmas bonus and enjoying their holidays. https://github.com/microsoft/winget-cli/issues/1684
Output from winget list Microsoft.Office: Microsoft 365 Apps for enterprise Microsoft.Office 16.0.14430.20342 16.0.14527.20276 winget Microsoft 365 Apps for enterprise - en-us O365ProPlusRetail - en-us 16.0.14430.20342 OneNote for Windows 10 Microsoft.Office.OneNote_8wekyb3d8bbwe 16001.14326.20588.0
This image is from word:
Same here, winget upgrade --all
is not working for ID "Micrrosoft.Office"
winget upgrade --all
Name ID Version Verfügbar Quelle
---------------------------------------------------------------------------------------------------
Microsoft 365 Apps for Enterprise - de-de Microsoft.Office 16.0.15427.20210 16.0.15427.20220 winget
Microsoft 365 Apps for enterprise - en-us Microsoft.Office 16.0.15427.20210 16.0.15427.20220 winget
2 Aktualisierungen verfügbar.
(1/1) Gefunden Microsoft 365 Apps for enterprise [Microsoft.Office] Version 16.0.15427.20220
Diese Anwendung wird von ihrem Besitzer an Sie lizenziert.
Microsoft ist nicht verantwortlich und erteilt keine Lizenzen für Pakete von Drittanbietern.
Downloading https://officecdn.microsoft.com/pr/wsus/setup.exe
██████████████████████████████ 8.03 MB / 8.03 MB
Der Installer-Hash wurde erfolgreich überprüft
Paketinstallation wird gestartet...
It then opens a cmd window https://pasteboard.co/lAWtg223Af8f.png and completes with the message "Successfully installed" (translated) although it did not do anything. Versions of de-de and en-us remain unchanged at next execution of upgrade --all
.
Erfolgreich installiert
This problem went away for me for about a month and is now back with version 16.0.15601.20230
trying to update to version 16.0.15629.20196
.
I observe exactly the same behaviour of this bug. After finishing winget upgrade --all
with the message Successfully installed
nothing changes and winget upgrade
still wants to install the same upgrade:
PS C:\Users\vaclav.brozik> winget upgrade --all
Name Id Version Available Source
---------------------------------------------------------------------------------------------------
Microsoft 365 Apps for enterprise - en-us Microsoft.Office 16.0.15629.20258 16.0.15726.20188 winget
1 upgrades available.
(1/1) Found Microsoft 365 Apps for enterprise [Microsoft.Office] Version 16.0.15726.20188
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://officecdn.microsoft.com/pr/wsus/setup.exe
██████████████████████████████ 7.07 MB / 7.07 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS C:\Users\vaclav.brozik> winget upgrade
Name Id Version Available Source
---------------------------------------------------------------------------------------------------
Microsoft 365 Apps for enterprise - en-us Microsoft.Office 16.0.15629.20258 16.0.15726.20188 winget
1 upgrades available.
I see the problem for the second time in last few months. First time MS Office got upgraded a different way and winget
stopped displaying the new version for few days. Now the problem is there again with the new MS Office version available.
The most problematic part of the bug is that winget
says Successfully installed
although right after that it still detects the older version. So obviously the message is wrong - the update was not "successfully installed".
Another problem is the empty black window being shown for several minutes during the upgrade. It should show at least some message so the user know the purpose of the window and what is going on.
The MS Office applications show version like below. Notice that the version is not exactly the same as the one detected by winget
:
Microsoft® Word for Microsoft 365 MSO (Version 2209 Build 16.0.15629.20256) 64-bit Microsoft® Outlook® for Microsoft 365 MSO (Version 2209 Build 16.0.15629.20256) 64-bit ...
The Office app confusingly shows something completely different:
Version : 18.2210.1203.0
I noticed this today. It looks like winget wants to install the "Current Channel" but we are on the "Monthly Enterprise Channel"
https://learn.microsoft.com/en-us/officeupdates/update-history-microsoft365-apps-by-date
I'm not aware of any way to tell winget to install the Monthly Enterprise Channel. Perhaps one day, it will see which channel you're on and pull from that.
I see something similar:
Name Id Version Available Source
---------------------------------------------------------------------------------------------------
Microsoft 365 Apps for enterprise - en-us Microsoft.Office 16.0.14931.20858 16.0.15726.20188 winget
1 upgrades available.
This is with Winget v. 1.4.10052.
Office apps themselves indicate that my organization is on the Semi-Annual Enterprise Channel with Office version 2202. So I suspect that the problem has to do with Winget somehow comparing that against what's available in the Monthly Enterprise Channel v. 2210.
As others have noted, installing/upgrading superficially seems to succeed, but subsequent calls to winget upgrade
indicate that the version(s) have not actually changed. I can't help wondering if this comes down to a permissions issue: in many (most?) organizations, the ability to install/upgrade Office apps requires elevated permissions. Could it be that only IT admins are allowed to perform such upgrades, and that Winget is merely mishandling the fault condition and improperly reporting success?
Update
Name Id Version Available Source
-------------------------------------------------------------------------------------------------------------------------------
Microsoft 365 Apps for enterprise - en-us Microsoft.Office 16.0.17328.20282 16.0.17531.20046 winget
1 upgrades available.
I'm seeing this with Winget v1.8.924-preview.
My organization is currently using Office version 2402. Same apparent problem as a year ago: Winget does not seem to honor the governing upgrade channel, and therefore makes an inappropriate version comparison, leading to a false mismatch and a noninstallable "upgrade".
@dschulman-repay My situation is the same but I have the local admin rights to my notebook. I had no problems installing any software.
So as far as we know the symptoms are connected to two bugs / missing functionality:
-
winget
reports:Successfully installed
when the installation in fact failed. -
winget
does not obey the selected MS Office upgrade channel.
FWIW: I ended up here because I wasn't sure whether my upgrade for Microsoft 365 Apps for enterprise - en-us
was working, but in the end it did - it just took around 20 minutes to complete, possibly a touch longer.
Oddly, it reported the following pre-upgrade:
Installed: 16.0.15831.20208
Available: 16.0.15928.20196
but installed a newer 16.0.15831.20216
.
I originally installed using the click2run installer from the office portal, so I think the current channel setting is correct for me. A second winget upgrade
doesn't report any more upgrades required.
The blank installer window just hangs forever for me (I've left it for four hours, it never finishes, and doesn't appear to be busy in Task Manager). Office was initially installed by my organization.
Name Id Version Available Source
-----------------------------------------------------------------------------------------------------------------------
Microsoft 365 Apps for enterprise - en… Microsoft.Office 16.0.15928.20282 16.0.16130.20218 winget
The biggest annoyance for me isn't that Office won't upgrade, it's that I really want to run winget upgrade --all
, but that office installation, which I know is going to fail, takes 5-10 minutes to do so. I ended up creating an import file and just run winget import -i myfile.json
and just have to remember to add any new installs to it.
The work on pinning should help a little here. At least, you can pin the packages that are causing trouble so winget upgrade --all
will skip/ignore the pinned packages.
Office has a very complex installer mechanism, and we're still working with them on improvements to the installer flow so we can give a better experience with WinGet.
Thanks for mentioning pinning. I am using it and it is really a good workaround. I am looking forward for it being included into the regular release. How to use it now?
- Install winget preview:
- https://github.com/microsoft/winget-cli#development-releases
- https://github.com/microsoft/winget-cli/releases
- Enable the pinning feature:
winget settings
This opens a text editor! with the JSON configuration file:
{
"experimentalFeatures": {
"pinning": true
}
}
- Use it:
winget pin add Microsoft.Office
How does it look like?
> winget -v
v1.5.1361-preview
> winget features
The following experimental features are in progress.
They can be configured through the settings file 'winget settings'.
Feature Status Property Link
-------------------------------------------------------------------------------------------------------------
Show Dependencies Information Disabled dependencies https://aka.ms/winget-settings
Direct MSI Installation Disabled directMSI https://aka.ms/winget-settings
Package Pinning Enabled pinning https://aka.ms/winget-settings
Uninstall Previous Argument Disabled uninstallPreviousArgument https://aka.ms/winget-settings
Configuration Disabled configuration https://aka.ms/winget-settings#configuration
Windows Feature Dependencies Disabled windowsFeature https://aka.ms/winget-settings
> winget pin list
Name Id Version Source Pin type
------------------------------------------------------------------------------------------------
Microsoft 365 Apps for enterprise - en-us Microsoft.Office 16.0.16227.20318 winget Pinning
VMware Workstation VMware.WorkstationPro 16.2.5 winget Pinning
> winget upgrade
No installed package found matching input criteria.
2 package(s) have pins that prevent upgrade. Use the 'winget pin' command to view and edit pins. Using the --include-pinned argument may show more results.
We're close with the release of WinGet 1.5 (it's in Release Candidate mode). Pinning is a stable feature in WinGet 1.5
I think this can be related to this issue, so I did not open a new one.
I tried pinning Microsoft.Office
just now, got the message No installed package found matching input criteria.
.
Logs from command winget pin add Microsoft.Office
Click to expand
2023-08-09 12:31:36.988 [CORE] WinGet, version [1.5.1881], activity [{A9A0FB4B-6038-4986-81EB-D6DC2120E006}]
2023-08-09 12:31:36.989 [CORE] OS: Windows.Desktop v10.0.22621.1992
2023-08-09 12:31:36.989 [CORE] Command line Args: winget pin add Microsoft.Office
2023-08-09 12:31:36.989 [CORE] Package: Microsoft.DesktopAppInstaller v1.20.1881.0
2023-08-09 12:31:36.989 [CORE] IsCOMCall:0; Caller: winget-cli
2023-08-09 12:31:36.993 [CLI ] WinGet invoked with arguments: 'pin' 'add' 'Microsoft.Office'
2023-08-09 12:31:36.993 [CLI ] Found subcommand: pin
2023-08-09 12:31:36.993 [CLI ] Found subcommand: add
2023-08-09 12:31:36.995 [CLI ] Leaf command to execute: root:pin:add
2023-08-09 12:31:36.995 [CLI ] Executing command: add
2023-08-09 12:31:37.006 [REPO] Default source requested, multiple sources available, adding all to source references.
2023-08-09 12:31:37.006 [REPO] Adding to source references msstore
2023-08-09 12:31:37.006 [REPO] Adding to source references winget
2023-08-09 12:31:37.007 [REPO] Multiple sources available, creating aggregated source.
2023-08-09 12:31:37.007 [REPO] Adding to aggregated source: msstore
2023-08-09 12:31:37.007 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2023-08-09 12:31:37.078 [REPO] Response status: 200
2023-08-09 12:31:37.078 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2023-08-09 12:31:37.089 [REPO] Response status: 200
2023-08-09 12:31:37.089 [REPO] Adding to aggregated source: winget
2023-08-09 12:31:37.098 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2023-08-09 12:31:37.098 [CORE] Found matching extension.
2023-08-09 12:31:37.121 [REPO] Opening SQLite Index for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2023.809.1041.838_neutral__8wekyb3d8bbwe\Public\index.db'
2023-08-09 12:31:37.121 [SQL ] Opening SQLite connection #1: 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2023.809.1041.838_neutral__8wekyb3d8bbwe\Public\index.db' [1, 40]
2023-08-09 12:31:37.122 [REPO] Opened SQLite Index with version [1.6], last write [2023-08-09 11:40:00.000]
2023-08-09 12:31:37.383 [REPO] Creating PredefinedInstalledSource with filter [None]
2023-08-09 12:31:37.383 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2023-08-09 12:31:37.383 [SQL ] Opening SQLite connection #2: ':memory:' [6, 0]
2023-08-09 12:31:37.410 [REPO] Reading MSI UpgradeCodes
2023-08-09 12:31:37.412 [REPO] Examining ARP entries for Machine | X64
2023-08-09 12:31:37.434 [REPO] Examining ARP entries for Machine | X86
2023-08-09 12:31:37.458 [REPO] Reading MSI UpgradeCodes
2023-08-09 12:31:37.460 [REPO] Examining ARP entries for User | X64
2023-08-09 12:31:37.749 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\olav.birkeland\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db'
2023-08-09 12:31:37.749 [SQL ] Opening SQLite connection #3: 'C:\Users\olav.birkeland\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db' [2, 0]
2023-08-09 12:31:37.749 [REPO] Opened SQLite Index with version [1.3], last write [2022-08-26 13:57:35.000]
2023-08-09 12:31:37.775 [REPO] Sending http POST request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch
2023-08-09 12:31:37.787 [REPO] Response status: 200
2023-08-09 12:31:37.791 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\olav.birkeland\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db'
2023-08-09 12:31:37.791 [SQL ] Opening SQLite connection #4: 'C:\Users\olav.birkeland\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db' [2, 0]
2023-08-09 12:31:37.791 [REPO] Opened SQLite Index with version [1.3], last write [2023-08-08 13:36:11.000]
2023-08-09 12:31:37.829 [REPO] Downloading manifest
2023-08-09 12:31:37.829 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/m/Microsoft/Office/16.0.16626.20148/be42-Microsoft.Office.yaml
2023-08-09 12:31:37.844 [CORE] Download hash: 107a01ef06db860cddac0317736d6cf7dd71ae1e467c8dd6ecb144308c74c267
2023-08-09 12:31:37.844 [CORE] Download completed.
2023-08-09 12:31:37.845 [REPO] Finding installed package from available package using system reference search: Query:[none] Include:NormalizedNameAndPublisher='microsoft 365 apps for enterprise'+'microsoft corporation'[Exact] Include:NormalizedNameAndPublisher='microsoft365appsforenterprise'+'microsoft'[Exact]
2023-08-09 12:31:37.846 [REPO] Found multiple matches for available package [Microsoft.Office] in source [Microsoft.Winget.Source_8wekyb3d8bbwe] when searching for [Query:[none] Include:NormalizedNameAndPublisher='microsoft 365 apps for enterprise'+'microsoft corporation'[Exact] Include:NormalizedNameAndPublisher='microsoft365appsforenterprise'+'microsoft'[Exact]]
2023-08-09 12:31:37.846 [REPO] Checking match with package id: O365ProPlusRetail - en-us
2023-08-09 12:31:37.846 [REPO] Checking match with package id: O365ProPlusRetail - nb-no
2023-08-09 12:31:37.846 [REPO] Appropriate installed package could not be determined
2023-08-09 12:31:37.846 [CLI ] No app found matching input criteria
2023-08-09 12:31:37.852 [CLI ] Terminating context: 0x8a150014 at D:\a\_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\WorkflowBase.cpp:395
Seems winget-cli
struggles when an app is listed as installed twice?
Edit: Never mind, it worked if using --id
.
This is still an (annoying, occurring repeatedly) issue. Pinning the version cannot be the solution. Any plans to fix this?
winget upgrade --all
looping update not sucessfull update
after period time, even its say successfully installed,