Troubleshooting Errors with WinGet
What
WinGet is a command line tool to manage applications on the Windows 10 and 11 platform.
Note that FileWave 15.4 or later is required.
When/Why
After we initially install any package,package wethere mostmay likelybe an error. This will have reason to uninstall it atoffer some point...andreasons wefor canthose useerrors.
How
TheMicrosoft processprovides forsome removingdocumentation aon packageerror is very similar to our installation and upgrade code, and equally simple. We'll use WinGet to remove a previously installed package. Clicking the Fileset and then Properties in the toolbar will bring you to the settings which will control if a WinGet application is removed by breaking the Association or Deployment.
Below is the properties dialog for the Fileset.codes.
Things
Related to consider on the properties dialog:Content
Namehttps://github.com/microsoft/winget-cli/blob/master/doc/windows/package-manager/winget/returnCodes.md- Is it the name you expected?URL- The publisher of the software. Go there and confirm it is what you expected.Uninstall when made passive- Do you want it to uninstall when the Association or Deployment is removed? Checking this box will make it so that if the Association or Deployment is removed in the future, the software should silently uninstall.
Keep in mind that some software does not silently uninstall so you should always test if you are going to enable this option. The uninstall functionality is up to the software vendor to implement properly. What our testing has found, though, is that the uninstall will only be "silent" if the 3rd party includes a QuietUninstallString in HKLM/Software/Microsoft/Windows/CurrentVersion/Uninstall. In the case of Firefox, Mozilla provides no such string...they only provide an UninstallString, which does prompt. So, "silent" in this case is not silent. As always, testing of these items before production rollout is always recommended.
Digging Deeper
You may be asking yourself can I make the uninstall silent if it isn't? Yes, probably. In the case of Firefox for instance, the uninstall string calls an executable called helper.exe. That executable, though, when run with a /S flag, will actually uninstall the application silently. So the command to do this could be placed into an Activation script on a separate Fileset to accomplish it instead of using the WinGet command if you find you need to solve for this.