Why sfx sevenzipsharp '7-zip : unsupported method' when extract?
Asked Answered
C

2

5

I have created hallo.7z and used 7zxSD_LZMA.sfx as module. I think my configuration is right but while extracting sfx I receive

7-zip : unsupported method

void CreateExeFile() 
{
    try
    {
        SfxModule mdl = SfxModule.Extended;
        SevenZipSfx sfx = new SevenZipSfx(mdl);

        sfx.ModuleFileName = @"7zxSD_LZMA.sfx";
        sfx.MakeSfx("D:\\hallo.7z",
                    new Dictionary<string, string> 
            { 
                { "Title", "Extract Files" }, 
                { "InstallPath", ProgramFilesx86() + "\\ATIG Platform" },
                { "BeginPrompt", "Choose directory },
                { "CancelPrompt", "Extract Now" },
                { "OverwriteMode", "0" },
                { "GUIMode", "1" },
                { "ExtractDialogText", "Process Extract" },
                { "ExtractTitle", "Extract Files" },
                { "ErrorTitle", "Error" }
            },
                    "D:\\hallo.exe");
        MessageBox.Show("Success !");
    }
    catch (IOException ex)
    {
        MessageBox.Show(this, ex.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
}

static string ProgramFilesx86()
{
    if (8 == IntPtr.Size
        || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
    {
        return Environment.GetEnvironmentVariable("ProgramFiles(x86)");
    }

    return Environment.GetEnvironmentVariable("ProgramFiles");
}

7zxSD_LZMA.sfx and 7zxSD_All can't run the extraction because used password.

Contemporary answered 29/12, 2013 at 4:28 Comment(1)
This should solve your issue.Helwig
A
14

I understood why it is showing so. This happended to me too. This is the reason which I found out: This SFX module does not support LZMA2 Archives and support only LZMA. So you will need to rebuild the archive as LZMA.

Regards :)

Argentum answered 11/11, 2014 at 7:59 Comment(0)
O
0

Another cause for this on Windows is due to path length restrictions on Windows. If your archive contains files that, when extracted, result in a path length greater than 260 chars (the max in Windows) you will see this same error.

Oilstone answered 7/12, 2019 at 17:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.