Skip to content

winget install shows "open file - security warning" dialog, requiring user interaction #703

Closed

Description

@svenmauch

Brief description of your issue

Installing packages with winget causes the "open file - security warning" dialog to appear.

Steps to reproduce

Use winget install or winget install --silent and install a package.

1

It used to install packages without the dialog before, with the same winget-cli version, so I'm not sure what changed.

Expected behavior

Installation without the "open file - security warning" dialog, ideally without user interaction when using --silent option.

Actual behavior

The following dialog appears

2

Environment

[winget --info]
Windows: Windows.Desktop v10.0.19042.746
Package: Microsoft.DesktopAppInstaller v1.11.2941.0

Activity

  1. ghost added
    Needs-Triage
    on Jan 17, 2021
  2. changed the title [-]winget install open "open file - security warning" requiring user interaction[/-] [+]winget install shows "open file - security warning" dialog, requiring user interaction[/+] on Jan 17, 2021
  3. megamorf commented on Jan 17, 2021

    @megamorf

    This does not have anything to do with winget. As can be seen in the screenshot the 7zip installer is not properly signed (or can not be validated because you're missing some Root CAs in your certificate store) so Windows intervenes to let you know of the risks of installing potentially harmful software.

    Edit:
    https://sourceforge.net/p/sevenzip/discussion/45797/thread/bf344d0cd8/
    https://sourceforge.net/p/sevenzip/discussion/45797/thread/16bb1a6b/

  4. svenmauch commented on Jan 18, 2021

    @svenmauch
    Author

    Hi, thanks for the quick response. What's really bugging me is that it sometimes just doesn't seem to happen and I couldn't yet figure out why. I just set up a new virtual machine and winget installed 7zip (among many others) without showing the dialog or requiring any user interaction.

    If I understand it correctly, Windows flags or remembers downloaded executables which are from the internet (?) to prompt if the publisher can't be verified. If I build an unsigned/untrusted executable locally, it does not show this dialog. So my assumption was that the sporadic occurence might have something to do with winget or could be prevented by it.

    Edit: I think I just figured it out: Windows only shows this when the SmartScreen filter for files is disabled. If there's any way to "un-flag" downloaded files I'd be grateful for a tip. Otherwise it currently seems to me that completely automated and silent installations with winget are only possible with SmartScreen enabled.

  5. megamorf commented on Jan 18, 2021

    @megamorf

    What are the chances that your systems had different UAC levels configured? On the lowest level UAC does not block the installation of unsigned packages if I remember correctly.

  6. svenmauch commented on Jan 18, 2021

    @svenmauch
    Author

    I had both systems with default UAC settings, so that wasn't the culprit. It really looks like SmartScreen influences if the dialog shows up.

    The "flag" seems to come from the zone information that is tagged to the file. In my case I can bypass the dialog by using set SEE_MASK_NOZONECHECKS=1. Maybe something that would make sense if it found its way into winget, at least for the silent option. I'll leave this issue open in case a developer wants to consider, otherwise it can be closed.

  7. denelon commented on Jan 19, 2021

    @denelon
    Collaborator

    Recent changes were made to the zone for an installer after it has been downloaded by the Windows Package Manager. https://github.com/microsoft/winget-cli/releases/tag/v0.2.3162-preview

  8. AltieresBatista commented on Oct 11, 2021

    @AltieresBatista

    when trying to uninstall mozilla.firefox even with the --silent command opens the box for the user asking if they want to uninstall or restore, does anyone know how to fix this?

  9. denelon commented on Oct 12, 2021

    @denelon
    Collaborator

    I think we may have to support the ability to specify "silent" uninstall arguments. That means a schema change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions