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.

Title: Python 3.5.2 installer hangs when run in session 0
Type: behavior Stage: resolved
Components: Installation, Windows Versions: Python 3.5
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: eryksun, paul.moore, spooja, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2016-10-03 06:14 by spooja, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (6)
msg277930 - (view) Author: (spooja) Date: 2016-10-03 06:14
Started the python 3.5.2 exe in session 0 using the task scheduler,
2 instances of python are running in task manager and the process gets hanged, killing the process did not create any logs in %temp% folder.
msg277943 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2016-10-03 09:18
Are you running python.exe without a script or command? That runs the REPL in session 0, which will block reading from stdin. It's harmless to kill this process. The REPL could detect that it's running in session 0 and exit. However, I'm not in favor of such a change because sometimes I intentionally run in session 0 via psexec.exe.
msg277946 - (view) Author: (spooja) Date: 2016-10-03 09:53
Sorry I did not understand your comment, what is REPL? I am not using any script just scheduling a task to run python using this command 'python-3.5.2-x86.exe' with /quiet option.

Are u telling me to kill the 2nd process that is getting created by the installer and the installation will work fine?
msg277955 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2016-10-03 11:51
For some reason you're trying to schedule the installer to run in session 0. I thought you were running python.exe in session 0 via the task scheduler, which would hang in the REPL [1].

msg277956 - (view) Author: (spooja) Date: 2016-10-03 12:37
Thank you for the link, yes am running in session 0 via the task scheduler.
msg388633 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2021-03-13 18:58
I tested installing 3.10 in session 0 for the current user, as a user with the batch logon right. The installation succeeded. If you're running as SYSTEM, then installing for the current user doesn't see reasonable to me. I won't test that case. 

I tested installing 3.10 in session 0 as SYSTEM, with the option InstallAllUsers=1. The installation succeeded. There's a caveat (bpo-25166) that the installer registers the uninstall record only for the current user. The SYSTEM account uses the default profile, so the uninstall record is stored under "HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Uninstall". In this case, to uninstall you have to run the installer as SYSTEM with the /uninstall option.
Date User Action Args
2022-04-11 14:58:37adminsetgithub: 72531
2021-03-13 18:58:35eryksunsetstatus: open -> closed
resolution: works for me
messages: + msg388633

stage: resolved
2016-10-03 12:37:11spoojasetmessages: + msg277956
2016-10-03 11:51:03eryksunsetmessages: + msg277955
components: + Installation
title: Python 3.5.2 hangs when running in session 0 -> Python 3.5.2 installer hangs when run in session 0
2016-10-03 09:53:47spoojasetmessages: + msg277946
2016-10-03 09:18:14eryksunsetnosy: + eryksun
messages: + msg277943
2016-10-03 06:42:01SilentGhostsetnosy: + paul.moore, tim.golden, zach.ware, steve.dower
components: + Windows
2016-10-03 06:14:44spoojacreate