HedgeModManager
HedgeModManager copied to clipboard
[Bug] "7zip is not installed" despite it being on path. Do not depend on registry keys.
Describe the issue/bug
I have installed 7zip without administrator rights by using this command:
cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"
However, when I install a mod from HedgeModManager, it cannot find 7zip. I added 7zip to my path and running the 7z command in Powershell works just fine. From browsing through the code, I discovered that HedgeModManager needs a registry key from 7zip to find it without looking at the path environment variable. My suggestion is that HedgeModManager should also check on the path environment variable while prioritising the registry key. In fact, this issue applies to WinRAR as well.
Expected Behaviour
HedgeModManager extracts the mod using 7zip just fine if it is on path.
Sounds like an issue with the installer failing to write the registry key to HKLM. Can you check if the key exists in HKCU? You should beable to check it by running reg query HKCU\Software\7-Zip /v Path*
I will look into using Path aswell later.
I have pushed a17f627707eccd5f47de8ec8e04127742ee57034 which should look for 7z.exe from the base directory, registry and then the path. Please give that commit a try and let me know if that solves your issue or not.
I cannot provide support nor maintain the WinRAR code as I do not use that archiver.
This issue is stale because it has been open for 30 days with no activity. Please comment on this issue if you don't want it to automatically close in 14 days.
This issue was closed because it has been inactive for 14 days since being marked as stale.