preprardir doesn't support WinRAR >5.40

Issue #169 new
Former user created an issue

preprardir fails with the following error when trying to extract a RAR executable that's newer than 5.40 (i. e. starting with 5.50b1):

Traceback (most recent call last):
  File "preprardir.py", line 283, in <module>
  File "preprardir.py", line 67, in main
  File "preprardir.py", line 124, in extract_rarbin
  File "preprardir.py", line 180, in get_rar_date_name
  File "F:\pyReScene\rescene\rar.py", line 1447, in __init__
ValueError: The file is not a valid .rar archive or .srr file.

Happens on both pyReScene 0.6.1 and the still fresh version 0.7

Comments (1)

  1. XP1

    You can extract the EXE and rename it manually. In cmd, for example:

    "%ProgramFiles%\WinRAR\Rar.exe" x "winrar-x64-550.exe" "Rar.exe" "."
    for /f "usebackq" %d in (`powershell "(get-item \"Rar.exe\").lastWriteTime.toString(\"yyyy-MM-dd\")"`) do ( ren "Rar.exe" "%d_rar550.exe" )
    rem
    

  2. Log in to comment