How can I disable the Microsoft Store Python App Execution Alias and delete the %LocalAppData%\Microsoft\WindowsApps\python*.exe from System and every current and new user?

Sam Ahn 0 Reputation points
2025-02-21T15:21:10.11+00:00

I am currently provisioning Windows 11 VMs and installing python on them, but when new users attempt to use python in Powershell, they are redirected to the Microsoft Store because of the default Windows App Execution Alias and the python*.exe symlinks in the %LocalAppData%\Microsoft\WindowsApps\ directory.

I cannot find a GPO that will disable Windows from creating these app execution aliases or the symlinks in the path above.

I cannot find a registry key to disable as these Python aliases are not associated with the typical registry key,
HKCU:\Software\Microsoft\Windows\CurrentVersion\App Paths
and is instead associated with Microsoft.DesktopAppInstaller which I cannot remove.

I want to avoid using Task Scheduler on every logon to check to see if these paths are removed.

Is there any way I can prevent new users from getting the Microsoft Store app execution alias and symlink path added to User envs, and automate the process?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,094 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.