gurrgur / er-patcher

Elden Ring enhancement patches (ultrawide support, custom frame rate limits and more) seamlessly integrated with steam.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PermissionError: [WinError 5] Access is denied: 'er-patcher-tmp\\eldenring.exe'

KandBM opened this issue · comments

ER briefly launches then crashes on Win 11 using python 3.9.18, so I ran it from my terminal and here is the error:

(base) PS C:\Program Files (x86)\Steam\steamapps\common\ELDEN RING\Game> python er-patcher.py -s -f -x launch_elden_ring_seamlesscoop.exe -- %command%
Traceback (most recent call last):
  File "C:\Program Files (x86)\Steam\steamapps\common\ELDEN RING\Game\er-patcher.py", line 148, in <module>
    rmtree(game_dir_patched)
  File "C:\Users\user\anaconda3\lib\shutil.py", line 759, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Users\user\anaconda3\lib\shutil.py", line 629, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Users\user\anaconda3\lib\shutil.py", line 627, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'er-patcher-tmp\\eldenring.exe'

Since I see similar issues below mine, I think I'm not the only one looking for a workaround. I'm guessing a windows security issue preventing the patcher from interacting with the game.

***EDIT: If I comment out line 148 rmtree(game_dir_patched), the game launches without an error, but just presents a white scenn before crashing. I'm also using Pure Dark's ER Upscaler mod. The same behaviour occurs when I run without the seamless coop mod too.