You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default Python is long path aware. We recently discovered when running our application via a service using pywin32 that our application could not access long paths even tho long path support was enabled on the host. We discovered that pythoservice.exe was not long path aware. We found that we were able to add long path support manually by using an application manifest and the Windows SDK mt.exe tool.
This issue is for making pythonservice.exe longPathAware when it is built so that a workaround does not have to be performed.
Expected behavior and actual behavior
Expected:
Service scripts running through pythonservice.exe are long path aware when the hosts registry has long paths enabled.
Actual:
Service scripts running through pythonservice.exe not long path aware when the hosts registry has long paths enabled.
Specifically install Windows SDK for Desktop C++ x86 Apps
Go to the python installation location of your environment where the Worker Agent is installed (Default: C:\Program Files\Python311), there should be an executable there called pythonservice.exe
Create a new file called pythonservice.exe.manifest in the same location and add the following contents:
Description
By default Python is long path aware. We recently discovered when running our application via a service using pywin32 that our application could not access long paths even tho long path support was enabled on the host. We discovered that pythoservice.exe was not long path aware. We found that we were able to add long path support manually by using an application manifest and the Windows SDK mt.exe tool.
This issue is for making pythonservice.exe longPathAware when it is built so that a workaround does not have to be performed.
Expected behavior and actual behavior
Expected:
Actual:
Steps to reproduce the problem
Enable Long Paths Registry Key
Download and Unzip: LongPathTest.zip
Install the Service:
TESTING Service
Windows service.service-test-log.txt
log in LongPathTest directory. There will be a[Errno 2] No such file or directory
error.Updating pythonservice.exe to be longPathAware:
Default: C:\Program Files\Python311
), there should be an executable there calledpythonservice.exe
pythonservice.exe.manifest
in the same location and add the following contents:pythonservice.exe.manifest
:TESTING Service
Windows service.service-test-log.txt
log in LongPathTest directory and you should see that the long path was read.System information
Python version and distribution:
3.11.11
pywin32 version:
308
Windows Version:
10.0.19045 Build 19045
DLL locations:
The text was updated successfully, but these errors were encountered: