Eryk Sun added the comment:
> processtoken = win32security.OpenProcessToken(process,
> win32con.MAXIMUM_ALLOWED)
> win32security.GetTokenInformation(processtoken,
> win32security.TokenMandatoryPolicy)
FYI, starting with Windows 8, the system supports pseudo-handles for the access
token of t
john_miller added the comment:
I changed the integrity-level of "C:\" to "Mandatory Label\High Mandatory
Level:(OI)(NP)(IO)(NW)" which seems to have fixed the problem.
Thanks for the help.
I guess I must have directly or through some other application indirectly
changed the integrity level
Eryk Sun added the comment:
> icacls.exe C:\Python38-32\python.exe lists Mandatory Label\
> Low Mandatory Level:(I)(NW) ** This might be the problem. Removing "L"
> with icacls might work.
>
> **When a user attempts to launch an executable file, the new process is
> created with the minimum of
john_miller added the comment:
Short summary:
>icacls.exe C:\Python38-32\python.exe lists Mandatory Label\Low Mandatory
>Level:(I)(NW) ** This might be the problem. Removing "L" with icacls might
>work.
>User integrity level is usually "Medium"
>**When a user attempts to launch an executable
Eryk Sun added the comment:
> Desktop rwx,
> Username-directory rwx,
POSIX permissions are not meaningful in Windows. Please run the following two
commands in a Python script in order to show the current user and the
access-control list on the directory:
import subprocess
subproce
New submission from john_miller :
Trying to write into a file fails with a PermissionError (PermissionError:
[Errno 13] Permission denied:).
Typing in a non-elevated shell (User is Administrator)
C:\Users\Username\Desktop>C:\Python38-32\python.exe
open("some_file.txt","w") fails on the Desktop