What's the AppData/Local/Microsoft/WindowsApps folder for? [duplicate]
This is strange issue I have observed. I installed Active Python 2.7 on Windows 10 (version 1903).
On typing “python” from search, opens the Python 2.7 prompt but when I type from command prompt window, it triggers the Microsoft Store.
Don't know how to fix it and this never happened on previous versions of Windows (RS5, RS4…)
Edit 2: Please suggest the solution to turn this off: either via command prompt or using answer file to get this after unattended installation.
Fixed it by removing it automatically on the settings page. Under Apps and Features, there are an application execution aliases.
I am running the latest 1903 update.
Deleting "C:\Users\Username\AppData\Local\Microsoft\WindowsApps\" from the system environment variable, PATH, prevented the Microsoft Store application from launching when I typed python.exe
and python3.exe
in a command prompt.
The folder WindowsApps within AppData has a bunch of executables that, if typed in a command prompt, such as iTunes
or python
would launch the Microsoft Store application allowing the user to download the Python or iTunes UWP application. Once this path is removed from the system variable, typing python.exe
or python3.exe
, will not launch the Microsoft Store.
This may sound dangerous but if you look in the folder, it has a bunch of exes that, as I said before that would redirect you to download Python from the Microsoft Store. If for example, you type in iTunes
in the command prompt, it would redirect you to download iTunes from the Microsoft Store.
These executables are built for the user's convenience and are not necessary tools for Windows to work.
As @Ramhound mentioned in a previous answer, this is an intentional change as announced in the article: Who put Python in the Windows 10 May 2019 Update?
The article describes the team's intent to make the process easiest for users new to Python:
If you’re already a Python expert with complex needs, you probably know how to install and use it. It’s much more likely that someone will hit this problem the first time they are trying to use Python. Many of the teachers we spoke to confirmed this hypothesis – students encounter this far more often than experienced developers.
So we made things easier.
I could not find a full list of features from 1903 on the microsoft site, but PureInfoTech provides a great comprehensive list of the new features
Not mentioned in the article, it also accompanies some new layout changes and features updates, such as in the Apps & Features in settings:
In settings, select Apps & Features, then you should see a new option 'App execution aliases' which will have python.exe and python3.exe
Turning the switch for each App execution alias either deletes or replaces that alias in the directory:
<user dir>\appdata\local\microsoft\windowsapps
It's also worth noting that if you have the update and python.exe or any of the aliases don't work for you, you may have to turn them off and on again, which I was able to do when python.exe was not available after the update.
Below worked for me:
- Uncheck python from "App execution aliases" Update's answer
- Delete the WindowsApps directory Tushar's answer
- Set
Path
variable toC:\Users\<user>\AppData\Local\Programs\Python\Python37