classification
Title: Microsoft store package has an invalid ExecutablePath registry entry
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Fredrik Mellbin, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2019-06-30 15:04 by Fredrik Mellbin, last changed 2019-07-09 13:21 by Fredrik Mellbin. This issue is now closed.

Files
File name Uploaded Description Edit
vs_installershell_2019-06-27_23-32-05.png Fredrik Mellbin, 2019-06-30 15:04 Executablepath error
Messages (4)
msg346931 - (view) Author: Fredrik Mellbin (Fredrik Mellbin) Date: 2019-06-30 15:04
The Microsoft store release doesn't seem to populate the the "ExecutablePath" registry entry properly. Instead it has a the path to something that isn't an executable which can be seen in the attached screenshot.

The expected behavior would be to have it point to "%LOCALAPPDATA%\Microsoft\WindowsApps\Python37.exe" (or something else that's reasonable) since PEP514 requires it to be an actual executable.
msg346939 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2019-06-30 20:08
> The expected behavior would be to have it point to 
> "%LOCALAPPDATA%\Microsoft\WindowsApps\Python37.exe" (or something 
> else that's reasonable) since PEP514 requires it to be an actual 
> executable.
 
This appears to be a duplicate of issue 36649. But I think this has to be looked at again. In Windows 10 1903 (build 10.0.18362.*), CreateProcess can directly run the real executable that's installed under "%ProgramFiles%\WindowsApps" by getting the package information it needs from the user's corresponding app-exec link in "%LocalAppData%\Microsoft\WindowsApps". Apparently the latest skip-ahead preview releases no longer implement this, in which case shouldn't the installer set the ExecutablePath and WindowedExecutablePath values to the user's "python.exe" and "pythonw.exe" app-exec links in "%LocalAppData%\Microsoft\WindowsApps"?
msg346956 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-07-01 04:03
Unfortunately, we don't control that path - it comes from a parameter substitution.

I'll have to see whether there's another parameter we can use. All of this stuff is in undocumented territory, unfortunately...
msg347559 - (view) Author: Fredrik Mellbin (Fredrik Mellbin) Date: 2019-07-09 13:21
This is fixed and works as expected in 3.7.4 from the MS Store.
History
Date User Action Args
2019-07-09 13:21:20Fredrik Mellbinsetstatus: open -> closed
resolution: fixed
messages: + msg347559

stage: resolved
2019-07-01 04:03:40steve.dowersetmessages: + msg346956
2019-06-30 20:08:08eryksunsetnosy: + eryksun
messages: + msg346939
2019-06-30 15:04:49Fredrik Mellbincreate