You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Windows package identity to ensure device permissions #254613
After some investigation on the devbox João Moreno (@joaomoreno) had issues from the appx package, we narrowed the problem at install time is from the RemoveAppxPackage being always called even when the package was not previously installed resulting in the powershell command to throw an error and trigger the WER dialog.
Whereas we want this identity for privacy controls to be always available,
Is it possible to condition the file explorer manifest items in the same manifest ?
If not, can we have multiple appx manifest for the same application. Like one main and the other like addons.
You cannot condition the manifest item. You can either have multiple manifests (PowerToys does this) or you can specify ECS_HIDDEN for the command to hide them when not enabled
The app that actually uses the microphone needs to have the package identity too. Easiest way would be for the package to have an Application element for that app, and that app also have the fusion manifest updated to include the MSIX element
Microphone gets used from an extension that runs in a child process of the VSCode application, so in this case a single package identity for VSCode application should be sufficient IIUC ?
Another followup from the doc related to the application element, I see
Add an Application element as shown for each executable associated with your application
Ensure TrustLevel is mediumIL and RuntimeBehavior is win32App as shown for Win32 compatibility
We have extensions that run from a child process of our application (the exe of the child process will be registered in the application element) can bring in their own exe files which they inturn spawn as separate processes, would those be affected in anyway since we cannot register them in our application manifest.
@shmuelie whats the best way to test that the package identity and the declared permissions are respected by the OS. Thanks!
I would check if you see VS Code in the Microphone settings (ms-settings:privacy-microphone), and if you disable its permissions, it should not work.
Another followup from the doc related to the application element, I see
Add an Application element as shown for each executable associated with your application
Ensure TrustLevel is mediumIL and RuntimeBehavior is win32App as shown for Win32 compatibility
We have extensions that run from a child process of our application (the exe of the child process will be registered in the application element) can bring in their own exe files which they inturn spawn as separate processes, would those be affected in anyway since we cannot register them in our application manifest.
Should be fine as by default child processes inherit the package identity of the starting process.
Shmueli Englard (@shmuelie) I am testing a full signed product build with appx identity from #257741, however even after installing the package I only see the global switch in privacy settings to toggle and not a per application switch. Is there a particular build of windows I should be testing with, I am currently on 26100.4652
@shmuelie I am testing a full signed product build with appx identity from #257741, however even after installing the package I only see the global switch in privacy settings to toggle and not a per application switch. Is there a particular build of windows I should be testing with, I am currently on 26100.4652
Which action do I need to get the build results from?
In the install flow, select Add to windows explorer context menu to get the appx installed. This build is from a older commit, in a future commit I have changed it to always install the appx package.
Get-AppxPackage -Name Microsoft.VisualStudioCodeInsiders should be valid once installation succeeds.
given it only affects process that change their integrity level on launch like gpu, renderer etc. Starting the application with --no-sandbox doesn't crash. Will investigate further and get back.
Shmueli Englard (@shmuelie) did Edge mention any issue related to the integrity level interfering with chromium sandbox ?
Activity
deepak1556 commentedon Jul 8, 2025
After some investigation on the devbox João Moreno (@joaomoreno) had issues from the appx package, we narrowed the problem at install time is from the
RemoveAppxPackagebeing always called even when the package was not previously installed resulting in the powershell command to throw an error and trigger the WER dialog.deepak1556 commentedon Jul 8, 2025
We currently ship AppxPackage with manifest needed for the file explorer context menu action https://github.com/microsoft/vscode-explorer-command/blob/main/template/AppxManifest.xml, this is optional at install time and also only available to insiders.
Whereas we want this identity for privacy controls to be always available,
shmuelie commentedon Jul 8, 2025
You cannot condition the manifest item. You can either have multiple manifests (PowerToys does this) or you can specify
ECS_HIDDENfor the command to hide them when not enabledjoaomoreno commentedon Jul 9, 2025
Relevant docs: https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/grant-identity-to-nonpackaged-apps#powershell
deepak1556 commentedon Jul 9, 2025
Thanks Shmueli Englard (@shmuelie) , for the main package identity does everything we have today in the current package manifest (minus the extension block https://github.com/microsoft/vscode-explorer-command/blob/3ee1d2ccc598b09932c7583b6ed9e47d8560a9fb/template/AppxManifest.xml#L62) be sufficient or anything else we need to add ?
shmuelie commentedon Jul 9, 2025
DeviceCapabilityformicrophone.Applicationelement for that app, and that app also have the fusion manifest updated to include the MSIX elementdeepak1556 commentedon Jul 9, 2025
shmuelie commentedon Jul 9, 2025
That will work then :)
deepak1556 commentedon Jul 24, 2025
Shmueli Englard (@shmuelie) whats the best way to test that the package identity and the declared permissions are respected by the OS. Thanks!
deepak1556 commentedon Jul 24, 2025
Another followup from the doc related to the application element, I see
We have extensions that run from a child process of our application (the exe of the child process will be registered in the application element) can bring in their own exe files which they inturn spawn as separate processes, would those be affected in anyway since we cannot register them in our application manifest.
shmuelie commentedon Jul 24, 2025
I would check if you see VS Code in the Microphone settings (
ms-settings:privacy-microphone), and if you disable its permissions, it should not work.Should be fine as by default child processes inherit the package identity of the starting process.
deepak1556 commentedon Jul 25, 2025
Shmueli Englard (@shmuelie) I am testing a full signed product build with appx identity from #257741, however even after installing the package I only see the global switch in privacy settings to toggle and not a per application switch. Is there a particular build of windows I should be testing with, I am currently on 26100.4652
shmuelie commentedon Jul 25, 2025
Which action do I need to get the build results from?
deepak1556 commentedon Jul 25, 2025
You can download from https://vscode.download.prss.microsoft.com/dbazure/download/insider/cd69bbfa533e1c63f4ef427be4c2e1367218ee33/VSCodeUserSetup-x64-1.103.0-insider.exe
In the install flow, select
Add to windows explorer context menuto get the appx installed. This build is from a older commit, in a future commit I have changed it to always install the appx package.Get-AppxPackage -Name Microsoft.VisualStudioCodeInsidersshould be valid once installation succeeds.deepak1556 commentedon Jul 25, 2025
Here is a build from the latest commit where appx will always get installed for the application irrespective of the context menu choice from the installer https://vscode.download.prss.microsoft.com/dbazure/download/insider/4c546e90565870f1f9d54571800cb8e720af53c6/VSCodeUserSetup-x64-1.103.0-insider.exe
deepak1556 commentedon Jul 28, 2025
Sandbox process crashes when app identity is registered, my suspicion is on
vscode/resources/win32/appx/AppxManifest.xml
Line 55 in 6a5e8b9
--no-sandboxdoesn't crash. Will investigate further and get back.Shmueli Englard (@shmuelie) did Edge mention any issue related to the integrity level interfering with chromium sandbox ?