Only install Appx package when context menu is selected#313954
Only install Appx package when context menu is selected#313954YexuanXiao wants to merge 4 commits intomicrosoft:mainfrom
Conversation
|
@deepak1556 Can you take a look? |
There was a problem hiding this comment.
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/RemoveAppxPackagehooks behind a newShouldInstallAppxPackagecheck. - Add
ShouldInstallAppxPackage()helper that returns true when either “add context menu (files)” or “add context menu (folders)” task is selected.
|
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 |
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.