Add "Convert to 7z" to .zip context menu


  1. Posts : 5
    Windows 10 Pro
       #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.
      My Computer


  2. Posts : 5,328
    Windows 11 Pro 64-bit
       #2

    Wow very nice thank you for sharing, like you said i was able to convert zip archive file to 7z archive file.
      My Computer


  3. Posts : 5,328
    Windows 11 Pro 64-bit
       #3

    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.
      My Computer


  4. Posts : 5
    Windows 10 Pro
    Thread Starter
       #4

    FreeBooter said:
    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.
    It only works with 7-Zip x64.

    For x86, open the reg file and replace programfiles with programfiles(x86)
      My Computer


  5. Posts : 5,328
    Windows 11 Pro 64-bit
       #5

    I have 7-Zip x64 i also check the registry values added by your registry file they are added to registry.
      My Computer


  6. Posts : 5
    Windows 10 Pro
    Thread Starter
       #6

    Make sure that HKEY_CLASSES_ROOT\.zip refers to 7-Zip.zip
      My Computer


  7. Posts : 5,328
    Windows 11 Pro 64-bit
       #7

    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.
      My Computer


  8. Posts : 5,478
    2004
       #8

    I couldn't get it to work updating HKCU. This did though (updating SystemFileAssociations instead).

    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&&copy /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)"
    It is a very neat command.
      My Computer


  9. Posts : 5,328
    Windows 11 Pro 64-bit
       #9

    Wow good news i have fix the issue now context menu have Convert to 7z option.
      My Computer


  10. Posts : 5,328
    Windows 11 Pro 64-bit
       #10

    Make sure associated zip with 7-zip for the user and all users from 7-Zip File Manager.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:17.
Find Us




Windows 10 Forums