Warn before opening downloaded WSL distributions - #41214
Merged
benhillis merged 1 commit intoAug 3, 2026
Merged
Conversation
Mark the WSLDistributionTar ProgId as always unsafe so Attachment Manager prompts before opening internet-zone .wsl files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 07f017b2-9e33-4595-97ce-0f45c5e4d06f
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the MSI packaging to ensure Windows shows the standard Attachment Manager warning dialog when a downloaded (internet-zone) .wsl distribution file is opened, by marking the WSLDistributionTar file type association as “always unsafe”.
Changes:
- Adds an
EditFlagsregistry value for theWSLDistributionTarProgId underHKLM\SOFTWARE\Classesto setFTA_AlwaysUnsafe(0x00020000/131072). - Ensures opening ZoneId=3
.wslfiles prompts the user beforewsl.exe --install --from-file "%1"is invoked.
dkbennett
approved these changes
Jul 31, 2026
OneBlue
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WSLDistributionTarProgId withFTA_AlwaysUnsafe.wslfilesReferences
FILETYPEATTRIBUTEFLAGSdocumentsFTA_AlwaysUnsafeas0x00020000for a ProgId'sEditFlagsvalueAssocIsDangerousdocuments that the Shell checksFTA_AlwaysUnsafewhen determining file-type risk and performing zone checksTesting
cmake .cmake --build . -- -mbin\X64\Debug\wsl.msiHKCR\WSLDistributionTar\EditFlagsis0x00020000.wslfile withZoneId=3displays the warning and Cancel prevents it from being opened