HedgeModManager icon indicating copy to clipboard operation
HedgeModManager copied to clipboard

[Bug] "7zip is not installed" despite it being on path. Do not depend on registry keys.

Open BlueStaggo opened this issue 2 years ago • 2 comments

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.

BlueStaggo avatar Jul 29 '22 09:07 BlueStaggo

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.

thesupersonic16 avatar Jul 29 '22 09:07 thesupersonic16

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.

thesupersonic16 avatar Jul 29 '22 10:07 thesupersonic16

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.

github-actions[bot] avatar Aug 28 '23 02:08 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Sep 11 '23 02:09 github-actions[bot]