Skip to content

Only install Appx package when context menu is selected#313954

Closed
YexuanXiao wants to merge 4 commits intomicrosoft:mainfrom
YexuanXiao:patch-1
Closed

Only install Appx package when context menu is selected#313954
YexuanXiao wants to merge 4 commits intomicrosoft:mainfrom
YexuanXiao:patch-1

Conversation

@YexuanXiao
Copy link
Copy Markdown

The current installation script unconditionally installs the Appx, causing Windows to always run an additional dllhost process, even when the user chooses not to add the context menu.

Copilot AI review requested due to automatic review settings May 3, 2026 14:28
@YexuanXiao
Copy link
Copy Markdown
Author

@deepak1556 Can you take a look?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Windows Inno Setup installer script to avoid staging/installing the Windows 11 context menu Appx package unless the user selects the context menu tasks, reducing unnecessary background dllhost activity for users who opt out.

Changes:

  • Gate Appx file staging and AddAppxPackage/RemoveAppxPackage hooks behind a new ShouldInstallAppxPackage check.
  • Add ShouldInstallAppxPackage() helper that returns true when either “add context menu (files)” or “add context menu (folders)” task is selected.

Comment thread build/win32/code.iss
@YexuanXiao
Copy link
Copy Markdown
Author

@joaomoreno

@dmitrivMS dmitrivMS assigned deepak1556 and unassigned aeschli May 3, 2026
@dmitrivMS dmitrivMS added install-update VS Code installation and upgrade system issues and removed triage-needed labels May 3, 2026
@dmitrivMS dmitrivMS self-assigned this May 3, 2026
@deepak1556
Copy link
Copy Markdown
Collaborator

Thank you, the reason we removed the context menu gate on the appx package was because it is also used now to support package identity, reference #257741

However, we still guard on context menu entry itself https://github.com/YexuanXiao/vscode/blob/84528b68360a73b6d1de4bf9dac07859500250e4/build/win32/code.iss#L1290 despite the appx being always installed, runtime check at https://github.com/microsoft/vscode-explorer-command/blob/676a2a43194e5821af2642926bc0eef9f6edd13f/src/explorer_command.cc#L88-L123

@deepak1556 deepak1556 closed this May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

install-update VS Code installation and upgrade system issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants