[BUG] WinGet integration is failing to install/update packages and hides useful error details
Please confirm these before moving forward
- [x] I have searched for my issue and have not found a similiar in the Open or Closed issues.
- [x] I have tested that this issue has not been fixed in the latest (beta or stable) release.
- [x] I have checked the Discussions section for solutions.
- [x] This issue is about a bug (if it is not, please use the correct template).
Winhance Version
Winhance v26.05.22 26.05.22 Marco du Plessis C:\Program Files\Winhance\
Windows version, edition, and architecture
Microsoft Windows 11 Pro OS Version: 10.0.26200 N/A Build 26200
Describe your issue
I am experiencing a broader issue with the Winhance WinGet integration. It is not only failing to install Microsoft Copilot; Winhance is also unable to properly install or update packages through the current WinGet integration in this version.
The main problem seems to be that Winhance relies on its bundled WinGet executable:
C:\Program Files\Winhance\winget-cli\winget.exe
When trying to install Microsoft Copilot, Winhance executed this command:
C:\Program Files\Winhance\winget-cli\winget.exe install --id 9NHT9RB2F4HD --silent --accept-package-agreements --accept-source-agreements --force --disable-interactivity --source msstore
The process failed with only this generic result:
Process return value: -1 (0xFFFFFFFF)
No useful WinGet stdout/stderr output was shown in the Winhance interface, which made troubleshooting very difficult.
After manual troubleshooting, I found that the issue was not limited to Copilot. The system had several broken or incomplete components related to WinGet and PowerShell package management:
WinGet/App Installer was broken or incomplete. The winget command initially existed only as a broken WindowsApps alias. PowerShellGet and PackageManagement were not loading correctly. NuGet provider was missing. Install-PackageProvider was initially unavailable. PackageManagement\Get-PackageProvider was not recognized. Repair-WinGetPackageManager was not available until the Microsoft.WinGet.Client module was installed. The Microsoft Store sources had to be reset and updated manually. The Copilot Store package ID used by Winhance, 9NHT9RB2F4HD, did not work in my case. The working Microsoft Copilot Store ID was XP9CXNGPPJ97XX.
Because Winhance only displayed 0xFFFFFFFF, it was not clear whether the problem was caused by the bundled WinGet executable, a broken system WinGet/App Installer, broken package management modules, Microsoft Store sources, or an outdated Microsoft Store package ID.
Steps to reproduce the issue
Open Winhance. Go to the section where apps/packages can be installed or restored. Try to install Microsoft Copilot or update/install packages through Winhance.
Winhance calls the bundled WinGet executable from:
C:\Program Files\Winhance\winget-cli\winget.exe
The operation fails with:
Process return value: -1 (0xFFFFFFFF)
Winhance does not show the real WinGet output, detailed error message, or repair suggestion.
Expected behavior
I expected Winhance to install or update packages successfully using WinGet.
If WinGet, Microsoft Store, App Installer, PowerShellGet, PackageManagement, or NuGet are broken, I expected Winhance to detect this and show a clear diagnostic message.
Ideally, Winhance should:
Check if the system WinGet/App Installer is healthy before installing or updating packages. Check whether Microsoft Store sources are working. Show full WinGet stdout/stderr when a package installation fails. Avoid hiding the real error behind only 0xFFFFFFFF. Avoid using outdated or hardcoded Microsoft Store package IDs when possible. Offer an option to reset/update WinGet sources. Warn the user if PowerShellGet, PackageManagement, NuGet, or App Installer are missing or broken. Prefer the official system WinGet when available and healthy, or at least compare it against the bundled WinGet. Provide a repair workflow or troubleshooting instructions when package installation/update fails.
Actual behavior
Instead, Winhance failed with only:
Process return value: -1 (0xFFFFFFFF)
The interface did not explain the real cause.
After investigation, the issue required manual repair outside Winhance.
This was the manual repair process that solved the problem:
Fixed the Windows PowerShell module path so it no longer loaded the wrong PowerShell 7 module paths:
$env:PSModulePath = @( "$env:USERPROFILE\Documents\WindowsPowerShell\Modules", "$env:ProgramFiles\WindowsPowerShell\Modules", "$env:WINDIR\system32\WindowsPowerShell\v1.0\Modules" ) -join ';'
Imported the required base modules:
Import-Module Microsoft.PowerShell.Security -Force Import-Module PackageManagement -Force Import-Module PowerShellGet -Force
Installed and imported the NuGet provider:
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force Import-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Trusted PSGallery:
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Installed the Microsoft WinGet Client module:
Install-Module -Name Microsoft.WinGet.Client -Scope AllUsers -Force -Repository PSGallery -AllowClobber Import-Module Microsoft.WinGet.Client -Force
Repaired WinGet/App Installer for all users:
Repair-WinGetPackageManager -AllUsers -Force -Latest
Reset and updated WinGet sources:
winget source reset --force winget source update winget source list
Installed Microsoft Copilot manually using the Store ID that worked:
winget install --id XP9CXNGPPJ97XX --source msstore --accept-package-agreements --accept-source-agreements
After these manual steps, WinGet started working again and Microsoft Copilot installed successfully outside Winhance.
Screenshots or Logs
Original Winhance command:
C:\Program Files\Winhance\winget-cli\winget.exe install --id 9NHT9RB2F4HD --silent --accept-package-agreements --accept-source-agreements --force --disable-interactivity --source msstore
Original Winhance result:
Process return value: -1 (0xFFFFFFFF)
Manual command that worked after repairing WinGet:
winget install --id XP9CXNGPPJ97XX --source msstore --accept-package-agreements --accept-source-agreements
WinGet sources after repair:
msstore winget winget-font
Additional context
This issue gives the impression that Winhance package installation/update is simply not working in this version.
In reality, the failure is caused by a combination of hidden problems:
Broken or incomplete system WinGet/App Installer Broken PowerShellGet/PackageManagement/NuGet environment Microsoft Store source needing reset/update Generic Winhance error handling Possibly outdated Microsoft Store package ID for Copilot
The most important issue is that Winhance hides the real diagnostic information and only shows 0xFFFFFFFF.
Please consider improving the WinGet integration by adding health checks, full logging, Store source repair/reset, and better package ID validation.
Steps to reproduce the issue
-
Open Winhance.
-
Go to the section where Winhance installs/restores Microsoft apps or packages through WinGet.
-
Try to install or restore Microsoft Copilot.
-
Winhance runs the bundled WinGet executable from:
C:\Program Files\Winhance\winget-cli\winget.exe -
The command used by Winhance is:
C:\Program Files\Winhance\winget-cli\winget.exe install --id 9NHT9RB2F4HD --silent --accept-package-agreements --accept-source-agreements --force --disable-interactivity --source msstore -
The installation fails with:
Process return value: -1 (0xFFFFFFFF) -
Winhance does not show the full WinGet output or any clear diagnostic message explaining the cause.
-
The same problem also affects package installation/update behavior through Winhance, because the WinGet integration does not detect or repair a broken/incomplete WinGet/App Installer environment.
-
After repairing WinGet manually outside Winhance, resetting WinGet sources, and using the Microsoft Copilot Store ID
XP9CXNGPPJ97XX, Copilot installed successfully with:winget install --id XP9CXNGPPJ97XX --source msstore --accept-package-agreements --accept-source-agreements
Expected behavior
I expected Winhance to install or update packages successfully through WinGet.
If WinGet, Microsoft Store, App Installer, PowerShellGet, PackageManagement, or NuGet are broken or incomplete, I expected Winhance to detect the problem before running the installation and show a clear diagnostic message.
I also expected Winhance to show the full WinGet stdout/stderr output instead of only the generic return value -1 (0xFFFFFFFF).
For Microsoft Copilot specifically, I expected Winhance to use a valid Microsoft Store package ID, install Copilot successfully, or clearly explain why the installation failed and how to fix it.
Actual behavior
Instead, Winhance failed to install Microsoft Copilot and other packages through its WinGet integration.
For Microsoft Copilot, Winhance executed the bundled WinGet command from:
C:\Program Files\Winhance\winget-cli\winget.exe
The command failed with only this generic result:
Process return value: -1 (0xFFFFFFFF)
No detailed WinGet output, stdout/stderr, or useful diagnostic information was shown in the Winhance interface.
The problem was not limited to Copilot. Package installation/update through Winhance was not working correctly because the underlying WinGet/App Installer environment was broken or incomplete. After troubleshooting manually, I found that PowerShellGet, PackageManagement, NuGet, and WinGet/App Installer needed repair.
After repairing everything manually outside Winhance, resetting/updating WinGet sources, and using the working Microsoft Copilot Store ID XP9CXNGPPJ97XX, Copilot installed successfully with the normal system WinGet.
So the actual behavior was that Winhance could not install/update packages properly through WinGet, hid the real error details behind 0xFFFFFFFF, and used a Copilot package ID that did not work in my environment.
Screenshots or Logs (if applicable)
No response
Additional context
No response
Additional clarification:
This issue is not only about Microsoft Copilot. The main problem is that Winhance package installation/update through the bundled WinGet integration failed and only returned a generic error:
Process return value: -1 (0xFFFFFFFF)
The Winhance command that failed was:
C:\Program Files\Winhance\winget-cli\winget.exe install --id 9NHT9RB2F4HD --silent --accept-package-agreements --accept-source-agreements --force --disable-interactivity --source msstore
The issue was resolved manually outside Winhance by repairing the Windows PowerShell/WinGet environment:
$env:PSModulePath = @(
"$env:USERPROFILE\Documents\WindowsPowerShell\Modules",
"$env:ProgramFiles\WindowsPowerShell\Modules",
"$env:WINDIR\system32\WindowsPowerShell\v1.0\Modules"
) -join ';'
Import-Module Microsoft.PowerShell.Security -Force
Import-Module PackageManagement -Force
Import-Module PowerShellGet -Force
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Import-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module -Name Microsoft.WinGet.Client -Scope AllUsers -Force -Repository PSGallery -AllowClobber
Import-Module Microsoft.WinGet.Client -Force
Repair-WinGetPackageManager -AllUsers -Force -Latest
winget source reset --force
winget source update
winget source list
After that, Microsoft Copilot installed successfully using the system WinGet and this Store ID:
winget install --id XP9CXNGPPJ97XX --source msstore --accept-package-agreements --accept-source-agreements
So the request is mainly to improve Winhance’s WinGet integration by:
- Showing full WinGet stdout/stderr instead of only
0xFFFFFFFF. - Checking whether WinGet/App Installer is healthy.
- Checking and updating Microsoft Store sources.
- Detecting broken PowerShellGet/PackageManagement/NuGet conditions.
- Avoiding outdated or hardcoded Microsoft Store package IDs.
- Providing a repair suggestion when package installation/update fails.
Noted, looking at this now.
Hey @zetmanutentez,
Thanks for the unusually thorough report — it helped us pin down exactly what happened. The -1 (0xFFFFFFFF) you saw wasn't actually a winget error code: when winget produces no output for 3 minutes, Winhance terminates it as a safety measure, and that termination was being shown as a bare exit code with no explanation. On your machine, winget hung because the Windows package-management stack itself was unhealthy (as your own repair confirmed — system winget was broken too until you ran Repair-WinGetPackageManager), but Winhance's reporting gave you nothing to go on. That part is on us, and it's fixed.
Three improvements are coming in the next release:
- The in-app terminal now shows winget's full error output (stderr was previously only written to the log file).
- When Winhance terminates a hung winget process, the terminal now says so explicitly — including a hint that the package source or the system's app deployment services may be unresponsive — instead of just
0xFFFFFFFF. - The Copilot Store ID you flagged was indeed outdated — it's been updated to
XP9CXNGPPJ97XX.
On preferring system winget: we bundle a version-locked winget precisely because stale system copies were hard-failing installs for many users, and in your case system winget was also broken until you repaired it — so the bundled copy isn't the culprit here. The real gap was diagnostics, and that's what we've addressed.
These fixes are in the development branch (e919eda7) and will be available for testing in Release 27.
Thanks for reporting!
Drafted and approved by @memstechtips - Sent by Memory's Agent
Muito obrigado pela resposta tão completa e pela rapidez em corrigir o problema.
É ótimo ver que o comportamento foi identificado — especialmente o watchdog encerrando o winget e isso aparecendo como 0xFFFFFFFF sem contexto. As melhorias que vocês implementaram (stderr visível, mensagem clara quando o processo é terminado e atualização do ID da Store) resolvem exatamente o que dificultou o diagnóstico no meu caso.
Também agradeço pela explicação sobre o winget empacotado. Faz sentido manter uma versão estável para evitar problemas em sistemas onde o WinGet oficial está corrompido, como aconteceu comigo.
Vou testar tudo novamente na Release 27. Obrigado pela atenção, transparência e rapidez na resposta.