This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python upgrade with SYSTEM account uninstalls python
Type: Stage: resolved
Components: Installation, Windows Versions: Python 3.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: JatinGoel, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2018-09-19 13:44 by JatinGoel, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
InstallPython JatinGoel, 2018-09-20 10:45 Python Installation log
Messages (6)
msg325760 - (view) Author: Jatin Goel (JatinGoel) Date: 2018-09-19 13:44
Team,

I have some Windows machines where Python version 3.6.2 is installed.

We are now upgrading them to 3.6.6

As part of our Install process, we launch the installation script with the SYSTEM account with the command:

python-3.6.6-amd64.exe /quiet InstallAllUsers=1 log "[logpath]\InstallPython"

This command works fine if I launch it interactively, i.e., from an Administrator account from command prompt, and version is upgraded successfully.


But when launching the same command from the SYSTEM account, it tries to install Just for Me, and not all users and some checks fails, and it removes the installed python as well.



[1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable 'InstallLauncherAllUsers' to value 1
[1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable 'Include_launcher' to value 1
[1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable 'DetectedLauncher' to value 1
[1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable 'Include_launcherState' to value 'disable'
[1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable 'InstallLauncherAllUsersState' to value 'disable'

[1C18:1F24][2018-09-19T16:25:58]w208: Plan disabled rollback for package: tcltk_JustForMe, due to incomplete cache: None, original rollback action: Install
[1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable 'WixBundleLog_tcltk_JustForMe' to value 'C:\ProgramData\Commvault Systems\Galaxy\LogFiles\Instance001\\InstallPython_007_tcltk_JustForMe.log'
[1C18:1F24][2018-09-19T16:25:58]i052: Condition 'not InstallAllUsers and Include_tcltk and Include_symbols and not LauncherOnly' evaluates to false.
[1C18:1F24][2018-09-19T16:25:58]i052: Condition 'not InstallAllUsers and Include_tcltk and Include_symbols and not LauncherOnly' evaluates to false.
[1C18:1F24][2018-09-19T16:25:58]i204: Plan 1 msi features for package: tcltk_JustForMe_pdb
[1C18:1F24][2018-09-19T16:25:58]i203: Planned feature: Symbols, state: Absent, default requested: Unknown, ba requested: Local, execute action: AddLocal, rollback action: Remove

[1C18:1F24][2018-09-19T16:26:03]i319: Applied execute package: dev_JustForMe, result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:26:03]i329: Removed package dependency provider: {5CE3EB5B-1823-4B8E-BE10-95262BDD1148}, package: exe_JustForMe
[1C18:1F24][2018-09-19T16:26:03]i301: Applying execute package: exe_JustForMe, action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python36\" OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
[1C18:1F24][2018-09-19T16:26:04]i319: Applied execute package: exe_JustForMe, result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:26:04]i329: Removed package dependency provider: {4D137679-6FB4-446B-9BDB-279292FA2D2C}, package: lib_JustForMe
[1C18:1F24][2018-09-19T16:26:04]i301: Applying execute package: lib_JustForMe, action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python36\" OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
[1C18:1F24][2018-09-19T16:26:47]i319: Applied execute package: lib_JustForMe, result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:26:47]i329: Removed package dependency provider: {C9596636-022D-4123-B369-98819F772985}, package: test_JustForMe
[1C18:1F24][2018-09-19T16:26:47]i301: Applying execute package: test_JustForMe, action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python36\" OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
[1C18:1F24][2018-09-19T16:27:15]i319: Applied execute package: test_JustForMe, result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:27:15]i329: Removed package dependency provider: {16EF5AB7-4A89-4F06-B20B-209DA4FE0533}, package: doc_JustForMe
[1C18:1F24][2018-09-19T16:27:16]i301: Applying execute package: doc_JustForMe, action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python36\" OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
[1C18:1F24][2018-09-19T16:27:17]i319: Applied execute package: doc_JustForMe, result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:27:17]i329: Removed package dependency provider: {E95CEC86-EFB3-47B8-A5F6-C8FB757AD060}, package: tools_JustForMe
[1C18:1F24][2018-09-19T16:27:17]i301: Applying execute package: tools_JustForMe, action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python36\" OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
[1C18:1F24][2018-09-19T16:27:23]i319: Applied execute package: tools_JustForMe, result: 0x0, restart: None
[1C18:1F24][2018-09-19T16:27:23]i329: Removed package dependency provider: {44EC13CA-E201-433B-B2D3-386B9609B859}, package: tcltk_JustForMe
[1C18:1F24][2018-09-19T16:27:23]i301: Applying execute package: tcltk_JustForMe, action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python36\" OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
[1C18:1F24][2018-09-19T16:27:23]e000: Error 0x80070643: Failed to uninstall MSI package.
[1C18:1F24][2018-09-19T16:27:23]e000: Error 0x80070643: Failed to configure per-user MSI package.
[1C18:1F24][2018-09-19T16:27:23]i319: Applied execute package: tcltk_JustForMe, result: 0x80070643, restart: None



Any help would be much appreciated on this.


Regards,
Jatin Goel
msg325763 - (view) Author: Jatin Goel (JatinGoel) Date: 2018-09-19 13:49
Correction to the install command:

python-3.6.6-amd64.exe /quiet InstallAllUsers=1 /log
"[logpath]\InstallPython"

On Wed, Sep 19, 2018 at 7:14 PM Jatin Goel <report@bugs.python.org> wrote:

>
> New submission from Jatin Goel <jatingoel1037@gmail.com>:
>
> Team,
>
> I have some Windows machines where Python version 3.6.2 is installed.
>
> We are now upgrading them to 3.6.6
>
> As part of our Install process, we launch the installation script with the
> SYSTEM account with the command:
>
> python-3.6.6-amd64.exe /quiet InstallAllUsers=1 log
> "[logpath]\InstallPython"
>
> This command works fine if I launch it interactively, i.e., from an
> Administrator account from command prompt, and version is upgraded
> successfully.
>
>
> But when launching the same command from the SYSTEM account, it tries to
> install Just for Me, and not all users and some checks fails, and it
> removes the installed python as well.
>
>
>
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable
> 'InstallLauncherAllUsers' to value 1
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable
> 'Include_launcher' to value 1
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting numeric variable
> 'DetectedLauncher' to value 1
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable
> 'Include_launcherState' to value 'disable'
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable
> 'InstallLauncherAllUsersState' to value 'disable'
>
> [1C18:1F24][2018-09-19T16:25:58]w208: Plan disabled rollback for package:
> tcltk_JustForMe, due to incomplete cache: None, original rollback action:
> Install
> [1C18:1F24][2018-09-19T16:25:58]i000: Setting string variable
> 'WixBundleLog_tcltk_JustForMe' to value 'C:\ProgramData\Commvault
> Systems\Galaxy\LogFiles\Instance001\\InstallPython_007_tcltk_JustForMe.log'
> [1C18:1F24][2018-09-19T16:25:58]i052: Condition 'not InstallAllUsers and
> Include_tcltk and Include_symbols and not LauncherOnly' evaluates to false.
> [1C18:1F24][2018-09-19T16:25:58]i052: Condition 'not InstallAllUsers and
> Include_tcltk and Include_symbols and not LauncherOnly' evaluates to false.
> [1C18:1F24][2018-09-19T16:25:58]i204: Plan 1 msi features for package:
> tcltk_JustForMe_pdb
> [1C18:1F24][2018-09-19T16:25:58]i203: Planned feature: Symbols, state:
> Absent, default requested: Unknown, ba requested: Local, execute action:
> AddLocal, rollback action: Remove
>
> [1C18:1F24][2018-09-19T16:26:03]i319: Applied execute package:
> dev_JustForMe, result: 0x0, restart: None
> [1C18:1F24][2018-09-19T16:26:03]i329: Removed package dependency provider:
> {5CE3EB5B-1823-4B8E-BE10-95262BDD1148}, package: exe_JustForMe
> [1C18:1F24][2018-09-19T16:26:03]i301: Applying execute package:
> exe_JustForMe, action: Uninstall, path: (null), arguments: '
> ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program
> Files\Python36\"
> OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
> [1C18:1F24][2018-09-19T16:26:04]i319: Applied execute package:
> exe_JustForMe, result: 0x0, restart: None
> [1C18:1F24][2018-09-19T16:26:04]i329: Removed package dependency provider:
> {4D137679-6FB4-446B-9BDB-279292FA2D2C}, package: lib_JustForMe
> [1C18:1F24][2018-09-19T16:26:04]i301: Applying execute package:
> lib_JustForMe, action: Uninstall, path: (null), arguments: '
> ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program
> Files\Python36\"
> OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
> [1C18:1F24][2018-09-19T16:26:47]i319: Applied execute package:
> lib_JustForMe, result: 0x0, restart: None
> [1C18:1F24][2018-09-19T16:26:47]i329: Removed package dependency provider:
> {C9596636-022D-4123-B369-98819F772985}, package: test_JustForMe
> [1C18:1F24][2018-09-19T16:26:47]i301: Applying execute package:
> test_JustForMe, action: Uninstall, path: (null), arguments: '
> ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program
> Files\Python36\"
> OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
> [1C18:1F24][2018-09-19T16:27:15]i319: Applied execute package:
> test_JustForMe, result: 0x0, restart: None
> [1C18:1F24][2018-09-19T16:27:15]i329: Removed package dependency provider:
> {16EF5AB7-4A89-4F06-B20B-209DA4FE0533}, package: doc_JustForMe
> [1C18:1F24][2018-09-19T16:27:16]i301: Applying execute package:
> doc_JustForMe, action: Uninstall, path: (null), arguments: '
> ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program
> Files\Python36\"
> OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
> [1C18:1F24][2018-09-19T16:27:17]i319: Applied execute package:
> doc_JustForMe, result: 0x0, restart: None
> [1C18:1F24][2018-09-19T16:27:17]i329: Removed package dependency provider:
> {E95CEC86-EFB3-47B8-A5F6-C8FB757AD060}, package: tools_JustForMe
> [1C18:1F24][2018-09-19T16:27:17]i301: Applying execute package:
> tools_JustForMe, action: Uninstall, path: (null), arguments: '
> ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program
> Files\Python36\"
> OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
> [1C18:1F24][2018-09-19T16:27:23]i319: Applied execute package:
> tools_JustForMe, result: 0x0, restart: None
> [1C18:1F24][2018-09-19T16:27:23]i329: Removed package dependency provider:
> {44EC13CA-E201-433B-B2D3-386B9609B859}, package: tcltk_JustForMe
> [1C18:1F24][2018-09-19T16:27:23]i301: Applying execute package:
> tcltk_JustForMe, action: Uninstall, path: (null), arguments: '
> ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program
> Files\Python36\"
> OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.6\InstalledFeatures"'
> [1C18:1F24][2018-09-19T16:27:23]e000: Error 0x80070643: Failed to
> uninstall MSI package.
> [1C18:1F24][2018-09-19T16:27:23]e000: Error 0x80070643: Failed to
> configure per-user MSI package.
> [1C18:1F24][2018-09-19T16:27:23]i319: Applied execute package:
> tcltk_JustForMe, result: 0x80070643, restart: None
>
>
>
> Any help would be much appreciated on this.
>
>
> Regards,
> Jatin Goel
>
> ----------
> components: Installation, Windows
> messages: 325760
> nosy: JatinGoel, paul.moore, steve.dower, tim.golden, zach.ware
> priority: normal
> severity: normal
> status: open
> title: Python upgrade with SYSTEM account uninstalls python
> versions: Python 3.6
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue34737>
> _______________________________________
>
msg325772 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2018-09-19 15:02
This looks like something particular to Tcl/Tk, and my best guess from a very quick look at your logs is that there's a malware scanner preventing the files from being deleted for some reason (perhaps it's triggering an extended scan of one of the files?). Or perhaps there's an app running that is using those file (though that's unlikely given the rest of Python uninstalled)?

Nothing is particularly special about the installer for this component, so my guess is it's something about your configuration. If you can find the tcltk uninstall log file (in your %TEMP% directory, near the one you quoted from) that may provide some more information.
msg325853 - (view) Author: Jatin Goel (JatinGoel) Date: 2018-09-20 10:45
Hi Steve,

It's not actually an issue with the Tcl/Tk package.

This is happening for all the packages.

Even with the installAllUsers flag set, the installation for all users fail, and then it tries to do justForMe installation, and that too is failing.

Again elaborating, this issue only comes when trying to upgrade the Python using the SYSTEM account.

No antivirus is running on any of the machines where it failed.

PFA the log file for Python installation.

You can find all the other log files in this GitHub repository: https://github.com/GoelJatin/PythonIssue34737
msg325919 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2018-09-20 18:21
Looking closer at the logs, it's the usual problem of not being able to upgrade a per-user install into an all-users install.

If you look at the logs closely, it's *uninstalling* the Just for Me install, not installing it.

The best option in this case is to detect the per-user install (should always be HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\{0e7285f4-8cd4-4f97-83ab-1c6946551e2c} for 64-bit) and uninstall it first.
msg325965 - (view) Author: Jatin Goel (JatinGoel) Date: 2018-09-21 06:23
Thanks for the info Steve.

Yeah I noticed it earlier, but couldn't make sense why it would try  per-user uninstall at all. (Thought some upgrade issue, and it was a rollback action)

Though we've been doing the installation for all users from the beginning with our script from SYSTEM account.

This is the first time we tried upgrade.

I'll check and verify on the machines if someone modified it, i.e., uninstalled python and then re-installed with Just for Me option selected.

Will let you know how it goes.

Thanks Again!
History
Date User Action Args
2022-04-11 14:59:06adminsetgithub: 78918
2021-10-19 23:08:21iritkatrielsetstatus: open -> closed
resolution: out of date
stage: resolved
2018-09-21 06:23:33JatinGoelsetmessages: + msg325965
2018-09-20 18:21:08steve.dowersetmessages: + msg325919
2018-09-20 10:45:14JatinGoelsetfiles: + InstallPython

messages: + msg325853
2018-09-19 15:02:37steve.dowersetmessages: + msg325772
2018-09-19 13:49:13JatinGoelsetmessages: + msg325763
2018-09-19 13:44:34JatinGoelcreate