New
#1
Add "Convert to 7z" to .zip context menu
Convert and replace zip files (requires 7-Zip).
ConvertTo7z.reg
Last edited by Labudovi; 03 Feb 2018 at 01:32.
Convert and replace zip files (requires 7-Zip).
ConvertTo7z.reg
Last edited by Labudovi; 03 Feb 2018 at 01:32.
Wow very nice thank you for sharing, like you said i was able to convert zip archive file to 7z archive file.
I'm having problem i have tested your registry file within Windows 10 installed VM and it worked but for some reason registry file does not work for me at my Windows 10 installed computer.
I have 7-Zip v18.01 installed on my computer.
I have 7-Zip x64 i also check the registry values added by your registry file they are added to registry.
Make sure that HKEY_CLASSES_ROOT\.zip refers to 7-Zip.zip
Yes i have make sure HKEY_CLASSES_ROOT\.zip refers to 7-Zip.zip i even configure associated zip wit 7-zip. I have no idea why it has work in VM but not my main computer they have same Windows 10 operating system.
I couldn't get it to work updating HKCU. This did though (updating SystemFileAssociations instead).
It is a very neat command.Code:Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\SystemFileAssociations\.zip\shell\ConvertTo7z] @="Convert to 7z" [HKEY_CLASSES_ROOT\SystemFileAssociations\.zip\shell\ConvertTo7z\command] @="cmd /v /c title Convert&cd /d \"!programfiles!\\7-Zip\"&&set \"var=%1\"&&set \"td=!temp!\\convert!random!!random!\"&&set \"tf=!temp!\\convert!random!!random!.7z\"&&7z x \"!var!\" -o\"!td!\" >nul&if !errorlevel! equ 0 ((7z a \"!tf!\" \"!td!\\*\" -t7z -mtm- >nul&© /y \"!tf!\" \"!var:~0,-4!.7z\" >nul&&del /f /a \"!var!\")&del /f \"!tf!\"&rmdir /s /q \"!td!\")&if !errorlevel! equ 0 (echo OK&timeout 1 >nul) else (echo Error: !errorlevel!&pause)"
Wow good news i have fix the issue now context menu have Convert to 7z option.
Make sure associated zip with 7-zip for the user and all users from 7-Zip File Manager.