2

My application gives the error "Installer hash does not match."

c:> winget install --accept-source-agreements --id IDHERE

Where can I update the hash? My package works OK when installed from Microsoft Store, from where does winget find the url it uses?

It seems other apps have this issue, too

https://github.com/microsoft/winget-cli/issues/714

not2qubit
  • 14,531
  • 8
  • 95
  • 135
Tom
  • 6,725
  • 24
  • 95
  • 159

3 Answers3

2

There are various forms of this issue, but most likely it is due to a corporate security group policy setting.

Here's how it would look, if you had a Group Policy blocking Microsoft store and Discord website URL's, and trying to install using and Admin powershell.

enter image description here

If the Group Policy is not the culprit, then you can enable InstallerHashOverride with (Admin), like this:

winget settings --enable InstallerHashOverride
# Enabled admin setting 'InstallerHashOverride'.

Then running in a normal posh, you can try with:

winget install -i -e Discord.Discord --ignore-security-hash

However, we might blocked again:

enter image description here

...and no, the operation was not cancelled by me!
(But by your corporate group policy.)

Checking the error with WinErr, we see that the error code is a combination of:

8007  FRS_ERR_INSUFFICIENT_PRIV
04c7  ERROR_CANCELLED
not2qubit
  • 14,531
  • 8
  • 95
  • 135
1

The package manifests are stored at winget-pkgs under the manifests folder. To update the hash you can use a tool like winget-create or YamlCreate. Each version of a package has its own manifest inside the proper folder constructed from the package identifier, so the hash can also be updated manually by editing the manifest directly

Trenly
  • 158
  • 6
0

it's not solvable. i tried cmd => winget install anydesk and it says "Installer hash does not match". installed it from the website.