Closed alexyvic closed 1 year ago
Hi, I'm also getting this error when running the script (I also had to the add the Global: to wingetpath variable). One other thing I've notice is when you do a winget list cmd, Company Portal looks like it has been installed from the old store (Microsoft.CompanyPortal_8wekyb3d8bbwe, Source: blank) rather than the expected (9wzdncrfj3pz, Source: msstore). Unless I'm understanding the listed info incorrectly.
Can you share the winget log that was generated please? C:\Windows\temp\winget\defaultstate\
2023-06-26 11:34:02.271 [CORE] WinGet, version [1.4.11071], activity [{C6EF881C-0406-4A81-9838-9DA77116C0D2}] 2023-06-26 11:34:02.273 [CORE] OS: Windows.Desktop v10.0.19044.3086 2023-06-26 11:34:02.274 [CORE] Command line Args: "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.19.11071.0_x648wekyb3d8bbwe\winget.exe" --version 2023-06-26 11:34:02.274 [CORE] IsCOMCall:0; Caller: winget-cli 2023-06-26 11:34:02.274 [CLI ] WinGet invoked with arguments: '--version' 2023-06-26 11:34:02.275 [CLI ] Leaf command to execute: root 2023-06-26 11:34:02.275 [CLI ] Executing command: root 2023-06-26 11:34:02.275 [CLI ] Leaf command succeeded: root 2023-06-26 11:34:05.380 [CORE] WinGet, version [1.4.11071], activity [{E6149887-0C5F-4D68-A2BD-9501D023203A}] 2023-06-26 11:34:05.385 [CORE] OS: Windows.Desktop v10.0.19044.3086 2023-06-26 11:34:05.385 [CORE] Command line Args: "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.19.11071.0_x648wekyb3d8bbwe\winget.exe" list --id 9WZDNCRFJ3PZ --source msstore --accept-source-agreements 2023-06-26 11:34:05.385 [CORE] IsCOMCall:0; Caller: winget-cli 2023-06-26 11:34:05.387 [CLI ] WinGet invoked with arguments: 'list' '--id' '9WZDNCRFJ3PZ' '--source' 'msstore' '--accept-source-agreements' 2023-06-26 11:34:05.387 [CLI ] Found subcommand: list 2023-06-26 11:34:05.387 [CLI ] Leaf command to execute: root:list 2023-06-26 11:34:05.387 [CLI ] Executing command: list 2023-06-26 11:34:05.407 [REPO] Named source requested, found: msstore 2023-06-26 11:34:05.407 [REPO] Source past auto update time [5 mins]; it has been at least 4093 mins 2023-06-26 11:34:05.416 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information 2023-06-26 11:34:05.795 [REPO] Response status: 200 2023-06-26 11:34:05.796 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information 2023-06-26 11:34:05.829 [REPO] Response status: 200 2023-06-26 11:34:06.050 [REPO] Creating PredefinedInstalledSource with filter [None] 2023-06-26 11:34:06.050 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:' 2023-06-26 11:34:06.050 [SQL ] Opening SQLite connection #1: ':memory:' [6, 0] 2023-06-26 11:34:06.086 [REPO] Reading MSI UpgradeCodes 2023-06-26 11:34:06.089 [REPO] Examining ARP entries for Machine | X64 2023-06-26 11:34:06.100 [REPO] Examining ARP entries for Machine | X86 2023-06-26 11:34:06.124 [REPO] Reading MSI UpgradeCodes 2023-06-26 11:34:06.127 [REPO] Examining ARP entries for User | X64 2023-06-26 11:34:06.176 [REPO] Opening SQLite Index for ReadWrite at 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' 2023-06-26 11:34:06.176 [SQL ] Opening SQLite connection #2: 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' [2, 0] 2023-06-26 11:34:06.178 [REPO] Opened SQLite Index with version [1.6], last write [2023-06-23 15:14:36.000] 2023-06-26 11:34:06.219 [REPO] Sending http POST request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch 2023-06-26 11:34:06.260 [REPO] Response status: 200 2023-06-26 11:34:06.261 [CLI ] No app found matching input criteria 2023-06-26 11:34:06.270 [CLI ] Terminating context: 0x8a150014 at D:\a_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\WorkflowBase.cpp:337 2023-06-26 11:34:06.348 [CORE] WinGet, version [1.4.11071], activity [{94900AB9-1697-4FA0-B0EB-4179C309E7A9}] 2023-06-26 11:34:06.350 [CORE] OS: Windows.Desktop v10.0.19044.3086 2023-06-26 11:34:06.350 [CORE] Command line Args: "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.19.11071.0_x64__8wekyb3d8bbwe\winget.exe" install --id 9WZDNCRFJ3PZ --accept-package-agreements --accept-source-agreements --source msstore --scope machine 2023-06-26 11:34:06.350 [CORE] IsCOMCall:0; Caller: winget-cli 2023-06-26 11:34:06.350 [CLI ] WinGet invoked with arguments: 'install' '--id' '9WZDNCRFJ3PZ' '--accept-package-agreements' '--accept-source-agreements' '--source' 'msstore' '--scope' 'machine' 2023-06-26 11:34:06.355 [CLI ] Found subcommand: install 2023-06-26 11:34:06.355 [CLI ] Leaf command to execute: root:install 2023-06-26 11:34:06.360 [CLI ] Executing command: install 2023-06-26 11:34:06.365 [REPO] Named source requested, found: msstore 2023-06-26 11:34:06.365 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information 2023-06-26 11:34:06.545 [REPO] Response status: 200 2023-06-26 11:34:06.545 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information 2023-06-26 11:34:06.573 [REPO] Response status: 200 2023-06-26 11:34:06.758 [REPO] Creating PredefinedInstalledSource with filter [None] 2023-06-26 11:34:06.758 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:' 2023-06-26 11:34:06.758 [SQL ] Opening SQLite connection #1: ':memory:' [6, 0] 2023-06-26 11:34:06.798 [REPO] Reading MSI UpgradeCodes 2023-06-26 11:34:06.801 [REPO] Examining ARP entries for Machine | X64 2023-06-26 11:34:06.813 [REPO] Examining ARP entries for Machine | X86 2023-06-26 11:34:06.834 [REPO] Reading MSI UpgradeCodes 2023-06-26 11:34:06.837 [REPO] Examining ARP entries for User | X64 2023-06-26 11:34:06.861 [REPO] Opening SQLite Index for ReadWrite at 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' 2023-06-26 11:34:06.861 [SQL ] Opening SQLite connection #2: 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' [2, 0] 2023-06-26 11:34:06.862 [REPO] Opened SQLite Index with version [1.6], last write [2023-06-23 15:14:36.000] 2023-06-26 11:34:06.929 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/packageManifests/9WZDNCRFJ3PZ?Market=GB 2023-06-26 11:34:06.983 [REPO] Response status: 200 2023-06-26 11:34:06.985 [CLI ] Found one app. App id: 9WZDNCRFJ3PZ App name: Company Portal 2023-06-26 11:34:06.986 [CLI ] Starting installer selection. 2023-06-26 11:34:06.986 [CLI ] Installer [Arm,msstore,User,] not applicable: Machine is not compatible with Arm 2023-06-26 11:34:06.986 [CLI ] Installer [Arm64,msstore,User,] not applicable: Machine is not compatible with Arm64 2023-06-26 11:34:06.986 [CLI ] Completed installer selection. 2023-06-26 11:34:06.986 [CLI ] Manifest fields: Name [Company Portal], Version [Unknown] 2023-06-26 11:34:07.005 [CLI ] Package agreements accepted by CLI flag 2023-06-26 11:34:08.811 [CLI ] Get device entitlement. 2023-06-26 11:34:10.715 [CLI ] Get entitlement succeeded. 2023-06-26 11:34:10.740 [CLI ] Started MSStore package execution. ProductId: 9WZDNCRFJ3PZ PackageFamilyName: Microsoft.CompanyPortal_8wekyb3d8bbwe 2023-06-26 11:34:57.256 [REPO] Opening SQLite Index for ReadWrite at 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' 2023-06-26 11:34:57.256 [SQL ] Opening SQLite connection #3: 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' [2, 0] 2023-06-26 11:34:57.258 [REPO] Opened SQLite Index with version [1.6], last write [2023-06-23 15:14:36.000] 2023-06-26 11:34:57.329 [CLI ] Leaf command succeeded: root:install
What device architecture was this run on?
2023-06-26 11:34:06.986 [CLI ] Installer [Arm64,msstore,User,] not applicable: Machine is not compatible with Arm64
Ben Whitmore Enterprise Mobility MVP
From: Frostygills @.> Sent: Monday, June 26, 2023 11:45:28 AM To: byteben/MEM @.> Cc: Ben Whitmore @.>; Comment @.> Subject: Re: [byteben/MEM] Always have Error 0x80070002 output, but can go through (Issue #4)
2023-06-26 11:34:02.271 [CORE] WinGet, version [1.4.11071], activity [{C6EF881C-0406-4A81-9838-9DA77116C0D2}] 2023-06-26 11:34:02.273 [CORE] OS: Windows.Desktop v10.0.19044.3086 2023-06-26 11:34:02.274 [CORE] Command line Args: "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.19.11071.0_x648wekyb3d8bbwe\winget.exe" --version 2023-06-26 11:34:02.274 [CORE] IsCOMCall:0; Caller: winget-cli 2023-06-26 11:34:02.274 [CLI ] WinGet invoked with arguments: '--version' 2023-06-26 11:34:02.275 [CLI ] Leaf command to execute: root 2023-06-26 11:34:02.275 [CLI ] Executing command: root 2023-06-26 11:34:02.275 [CLI ] Leaf command succeeded: root 2023-06-26 11:34:05.380 [CORE] WinGet, version [1.4.11071], activity [{E6149887-0C5F-4D68-A2BD-9501D023203A}] 2023-06-26 11:34:05.385 [CORE] OS: Windows.Desktop v10.0.19044.3086 2023-06-26 11:34:05.385 [CORE] Command line Args: "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.19.11071.0_x648wekyb3d8bbwe\winget.exe" list --id 9WZDNCRFJ3PZ --source msstore --accept-source-agreements 2023-06-26 11:34:05.385 [CORE] IsCOMCall:0; Caller: winget-cli 2023-06-26 11:34:05.387 [CLI ] WinGet invoked with arguments: 'list' '--id' '9WZDNCRFJ3PZ' '--source' 'msstore' '--accept-source-agreements' 2023-06-26 11:34:05.387 [CLI ] Found subcommand: list 2023-06-26 11:34:05.387 [CLI ] Leaf command to execute: root:list 2023-06-26 11:34:05.387 [CLI ] Executing command: list 2023-06-26 11:34:05.407 [REPO] Named source requested, found: msstore 2023-06-26 11:34:05.407 [REPO] Source past auto update time [5 mins]; it has been at least 4093 mins 2023-06-26 11:34:05.416 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information 2023-06-26 11:34:05.795 [REPO] Response status: 200 2023-06-26 11:34:05.796 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information 2023-06-26 11:34:05.829 [REPO] Response status: 200 2023-06-26 11:34:06.050 [REPO] Creating PredefinedInstalledSource with filter [None] 2023-06-26 11:34:06.050 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:' 2023-06-26 11:34:06.050 [SQL ] Opening SQLite connection #1https://github.com/byteben/MEM/issues/1: ':memory:' [6, 0] 2023-06-26 11:34:06.086 [REPO] Reading MSI UpgradeCodes 2023-06-26 11:34:06.089 [REPO] Examining ARP entries for Machine | X64 2023-06-26 11:34:06.100 [REPO] Examining ARP entries for Machine | X86 2023-06-26 11:34:06.124 [REPO] Reading MSI UpgradeCodes 2023-06-26 11:34:06.127 [REPO] Examining ARP entries for User | X64 2023-06-26 11:34:06.176 [REPO] Opening SQLite Index for ReadWrite at 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' 2023-06-26 11:34:06.176 [SQL ] Opening SQLite connection #2https://github.com/byteben/MEM/pull/2: 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' [2, 0] 2023-06-26 11:34:06.178 [REPO] Opened SQLite Index with version [1.6], last write [2023-06-23 15:14:36.000] 2023-06-26 11:34:06.219 [REPO] Sending http POST request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch 2023-06-26 11:34:06.260 [REPO] Response status: 200 2023-06-26 11:34:06.261 [CLI ] No app found matching input criteria 2023-06-26 11:34:06.270 [CLI ] Terminating context: 0x8a150014 at D:\a_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\WorkflowBase.cpp:337 2023-06-26 11:34:06.348 [CORE] WinGet, version [1.4.11071], activity [{94900AB9-1697-4FA0-B0EB-4179C309E7A9}] 2023-06-26 11:34:06.350 [CORE] OS: Windows.Desktop v10.0.19044.3086 2023-06-26 11:34:06.350 [CORE] Command line Args: "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.19.11071.0_x64__8wekyb3d8bbwe\winget.exe" install --id 9WZDNCRFJ3PZ --accept-package-agreements --accept-source-agreements --source msstore --scope machine 2023-06-26 11:34:06.350 [CORE] IsCOMCall:0; Caller: winget-cli 2023-06-26 11:34:06.350 [CLI ] WinGet invoked with arguments: 'install' '--id' '9WZDNCRFJ3PZ' '--accept-package-agreements' '--accept-source-agreements' '--source' 'msstore' '--scope' 'machine' 2023-06-26 11:34:06.355 [CLI ] Found subcommand: install 2023-06-26 11:34:06.355 [CLI ] Leaf command to execute: root:install 2023-06-26 11:34:06.360 [CLI ] Executing command: install 2023-06-26 11:34:06.365 [REPO] Named source requested, found: msstore 2023-06-26 11:34:06.365 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information 2023-06-26 11:34:06.545 [REPO] Response status: 200 2023-06-26 11:34:06.545 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information 2023-06-26 11:34:06.573 [REPO] Response status: 200 2023-06-26 11:34:06.758 [REPO] Creating PredefinedInstalledSource with filter [None] 2023-06-26 11:34:06.758 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:' 2023-06-26 11:34:06.758 [SQL ] Opening SQLite connection #1https://github.com/byteben/MEM/issues/1: ':memory:' [6, 0] 2023-06-26 11:34:06.798 [REPO] Reading MSI UpgradeCodes 2023-06-26 11:34:06.801 [REPO] Examining ARP entries for Machine | X64 2023-06-26 11:34:06.813 [REPO] Examining ARP entries for Machine | X86 2023-06-26 11:34:06.834 [REPO] Reading MSI UpgradeCodes 2023-06-26 11:34:06.837 [REPO] Examining ARP entries for User | X64 2023-06-26 11:34:06.861 [REPO] Opening SQLite Index for ReadWrite at 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' 2023-06-26 11:34:06.861 [SQL ] Opening SQLite connection #2https://github.com/byteben/MEM/pull/2: 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' [2, 0] 2023-06-26 11:34:06.862 [REPO] Opened SQLite Index with version [1.6], last write [2023-06-23 15:14:36.000] 2023-06-26 11:34:06.929 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/packageManifests/9WZDNCRFJ3PZ?Market=GB 2023-06-26 11:34:06.983 [REPO] Response status: 200 2023-06-26 11:34:06.985 [CLI ] Found one app. App id: 9WZDNCRFJ3PZ App name: Company Portal 2023-06-26 11:34:06.986 [CLI ] Starting installer selection. 2023-06-26 11:34:06.986 [CLI ] Installer [Arm,msstore,User,] not applicable: Machine is not compatible with Arm 2023-06-26 11:34:06.986 [CLI ] Installer [Arm64,msstore,User,] not applicable: Machine is not compatible with Arm64 2023-06-26 11:34:06.986 [CLI ] Completed installer selection. 2023-06-26 11:34:06.986 [CLI ] Manifest fields: Name [Company Portal], Version [Unknown] 2023-06-26 11:34:07.005 [CLI ] Package agreements accepted by CLI flag 2023-06-26 11:34:08.811 [CLI ] Get device entitlement. 2023-06-26 11:34:10.715 [CLI ] Get entitlement succeeded. 2023-06-26 11:34:10.740 [CLI ] Started MSStore package execution. ProductId: 9WZDNCRFJ3PZ PackageFamilyName: Microsoft.CompanyPortal_8wekyb3d8bbwe 2023-06-26 11:34:57.256 [REPO] Opening SQLite Index for ReadWrite at 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' 2023-06-26 11:34:57.256 [SQL ] Opening SQLite connection #3https://github.com/byteben/MEM/issues/3: 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft/WinGet\State\defaultState\StoreEdgeFD\installed.db' [2, 0] 2023-06-26 11:34:57.258 [REPO] Opened SQLite Index with version [1.6], last write [2023-06-23 15:14:36.000] 2023-06-26 11:34:57.329 [CLI ] Leaf command succeeded: root:install
— Reply to this email directly, view it on GitHubhttps://github.com/byteben/MEM/issues/4#issuecomment-1607195903, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKSAHIGQOJINBPIDLX4LF3LXNFR4RANCNFSM6AAAAAAZNBRHOU. You are receiving this because you commented.Message ID: @.***>
Windows 10 x64.
Hi, I'm also getting this error when running the script (I also had to the add the Global: to wingetpath variable). One other thing I've notice is when you do a winget list cmd, Company Portal looks like it has been installed from the old store (Microsoft.CompanyPortal_8wekyb3d8bbwe, Source: blank) rather than the expected (9wzdncrfj3pz, Source: msstore). Unless I'm understanding the listed info incorrectly.
There isnt a new store per se, its the same store and the same app :)
Can you please try version 1.06.27.0 winget was installing the appxprovisionedpackage but the manifest was not registering which would result in the app not appearing for the logged on user. New users logging on should have the appx package provisioned ok
We found the root cause and a fix is inbound for v2 of the script
All 3 conditions listed below are fixed in V1.07.03.0 of Reset-Appx.ps1 Bug Fixes, Enhancements and Refactoring 🪲🌟🧑💻
Condition 1: When WinGet installs the app as SYSTEM, the AppxPackage can fail to register so the AppxPackage regresses, resulting in the ap not being available for the user.
Condition 2: The AppxPackage was staged as SYSTEM
Condition 3: After the WinGet install, WinGet list did not detect the app
WinGet will retry 10 times (by default) to install the app successfully and ensure the conditions above are not present. There is also a 30 second wait (by default) when testing the AppxPackage after WinGet has installed the app
Current: 1.06.18.0
Is the error 0x80070002 always expected? I have run it a few times, and each time I receive the same error. However, it does not affect the Winget installation.