Title: Windows Installer Ignores Launcher Installer Options Where The Python Launcher Is Already Present
Type: behavior Stage:
Components: Windows Versions: Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Max Bowsher, gr-dexterl, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2018-11-09 19:27 by gr-dexterl, last changed 2018-11-12 10:02 by gr-dexterl.

Messages (3)
msg329550 - (view) Author: Dexter (gr-dexterl) Date: 2018-11-09 19:27
When installing Python 3.7 from the Windows Installer in a restricted environment the installer appears to ignore the InstallLauncherAllUsers=0 and Include_launcher=0 flags if the launcher is already present from a previous install.

I am on a machine where the system python is centrally controlled and cannot be modified by me. In previous versions I have installed personal copies using the InstallLauncherAllUsers=0 InstallAllUsers=0 as exemplified in the docs or just unticking in the UI. However in 3.7 the tick-box for the launcher is ticked but greyed out in the UI. I am unable to de-select it and, as I do not have permission to modify the system wide launcher, I cannot install Python 3.7.

My suspicion is that the box is greyed out if someone has installed the site wide version to ensure the site wide version is in-line with the installer but:

a) What if this is an older version and I do not want it replaced.
b) What if a user like me can't upgrade that script and is happy to have a version that will not be understood by the launcher for other purposes.

Assuming there is no current workaround. I propose that either we remove this restriction or at least allow an override. e.g. ForceExistingLauncherUpgrade=1 by default to preserve current behaviour and if 0 then allow the other launcher exclusions to apply.
msg329673 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2018-11-11 14:04
Does it actually try to upgrade the launcher? This is a case that was deliberately designed and tested before release, though it's possible that there's some mix of versions that is new.

The box is checked to indicate that the launcher will be installed at the end of setup, but not necessarily that the installer is going to try and install the launcher. This is the usual convention for this scenario.

If you're getting install failures, please attach the log file linked at the end of the install. We'll need that to diagnose the scenario.
msg329727 - (view) Author: Dexter (gr-dexterl) Date: 2018-11-12 10:02
Sadly due to the secure environment I'm unable to attach the log. The exact error is:

"You must be an Administrator to remove this application. To remove this application you can log on as an Administrator, or contact your technical support group for assistance."

This is when installing to an arbitrary folder under my control. This is exactly what happens with the 3.5 installer which I also need because of third party apps with hard coded pyenv versions. The difference is that I can simply un-tick the launcher for all users box to allow the install. Given that this is for a specific third party app I don't actually have any need of the launcher knowing about this version at all.

If you can tell me what part of the installer log is of interest I may be able to send an anonymised snippet.

The error code is: 0x80070643 - Fatal Error During Installation.

The point in the log where I see an error is:
Error 0x80070643: Failed to uninstall MSI package.
Error 0x80070643: Failed to execute MSI package.
Error 0x80070643: Failed to configure per-machine MSI package.
Applied execute package: core_AllUsers, result: 0x80070643, restart: None
Error 0x80070643: Failed to execute MSI package.

This is just after: "Verified existing payload: pip_JustForMe"

I'm not quite sure what you mean though. What is the difference between "the launcher will be installed at the end of setup" and "the installer is going to try and install the launcher" if you mean it's a separate process that'll still never work for a restricted environment like this.

It's basically a problem that the "for all users (requires elevation)" tickbox is selected. The launcher but not for all users might work but the fact that I can't un-tick something that says it requires elevation when I can't have elevation is a full blocker no matter what. Also under advanced options for Python itself I can un-tick the for all users just not for the launcher.

The specific fail point is not exactly an upgrade it claims it doesn't have permission to uninstall something. Given that the launcher is the only thing I can't un-tick and launcher only fails in the same way I'm assuming it's the all-users launcher.

But yeah I'm in a situation where I will never have permission to uninstall nor upgrade nor modify that file in any way so having it force an upgrade means I can't install the newer Python versions. I had the same issue in 3.5 but there the InstallLauncherAllUsers=0 InstallAllUsers=0 flags were sufficient to allow an isolated install.
Date User Action Args
2018-11-12 10:02:19gr-dexterlsetmessages: + msg329727
2018-11-11 14:04:30steve.dowersetmessages: + msg329673
2018-11-09 20:37:34Max Bowshersetnosy: + Max Bowsher
2018-11-09 19:27:37gr-dexterlcreate