winget-cli: Unable to install *anything* - "The parameter is incorrect."
Brief description of your issue
Every time I try to install a package, any package at all, I get an error dialog with “The parameter is incorrect.” I have previously installed ~dozen packages without incident.
Steps to reproduce
In PowerShell window (Admin or normal, makes no difference) install any valid package:
winget install Microsoft.VisualStudioCode
(using VSCode as arbitrary example)
Expected behavior
I expect the package to be installed successfully.
Actual behavior
The PowerShell window hangs and an error dialog pops up with the error “The parameter is incorrect”, with title bar of this dialog showing the installer of the package I’m trying to install. After clicking “OK” in dialog, it disappears and the PS windows shows “Installer failed with exit code: 1223”
Environment
Windows Package Manager v0.2.2521 Preview
Windows: Windows.Desktop v10.0.19041.508
Package: Microsoft.DesktopAppInstaller v1.11.2521.0
Tried this in PowerShell v7.0.3
, Windows Terminal Version: 1.2.2381.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 32 (17 by maintainers)
I’ve figured out the issue, and fortunately it is already resolved in the next client release.
I was able to repro on a machine thanks to @stvhwrd , and found that the problem comes from placing the MotW on the downloaded file. When it is Zone 3, affected machines will generate the invalid parameter error from within the kernel process creation, while also strangely removing the Zone.Identifier alternate stream. I can only assume that this is some particular AV driver or specific enterprise security enforcement, because it does not affect many people.
When I manually set the Zone.Identifier to Zone 2, like we are now doing for trusted sources, the process creation does not fail, and the Zone.Identifier alternate stream is not removed.
I believe that we are very close to releasing the next version that includes the Zone change, and will work with @denelon to get it to you as soon as we can.
Thanks for the quick response.
We have received them, and will take a look. Thank you very much for sharing!