Incorrect parameter error when using 7-zip from the command line in Windows












1














I am running the following command:



7z.exe a -t7z -m9=LZMA2 test.7z test.txt


However, I get this error: System error:The parameter is incorrect. The error only occurs if I use the -m9=LZMA2 or -m9=LZMA switches. If I remove it, it works perfectly fine. What am I doing wrong?



I am executing the command from Windows XP, 7 and 2008.










share|improve this question
























  • Your command works on my end - which version of 7zip are you using?
    – zb226
    Aug 26 '12 at 21:26










  • @zb226 - Version 9.20
    – PeanutsMonkey
    Aug 26 '12 at 21:35






  • 1




    Weird, that's the same version I'm using... If I change LZMA2 to something bogus, like xyz, I get the The parameter is incorrect. error... And using LZMA works too, btw.
    – zb226
    Aug 26 '12 at 21:41










  • @zb226 - Would anything else cause the issue?
    – PeanutsMonkey
    Aug 26 '12 at 23:16










  • Tried it on another machine today and it works there as well (exactly as stated above). Did you download it from here? For reference, the MD5 hash is 42badc1d2f03a8b1e4875740d3d49336.
    – zb226
    Aug 27 '12 at 10:30


















1














I am running the following command:



7z.exe a -t7z -m9=LZMA2 test.7z test.txt


However, I get this error: System error:The parameter is incorrect. The error only occurs if I use the -m9=LZMA2 or -m9=LZMA switches. If I remove it, it works perfectly fine. What am I doing wrong?



I am executing the command from Windows XP, 7 and 2008.










share|improve this question
























  • Your command works on my end - which version of 7zip are you using?
    – zb226
    Aug 26 '12 at 21:26










  • @zb226 - Version 9.20
    – PeanutsMonkey
    Aug 26 '12 at 21:35






  • 1




    Weird, that's the same version I'm using... If I change LZMA2 to something bogus, like xyz, I get the The parameter is incorrect. error... And using LZMA works too, btw.
    – zb226
    Aug 26 '12 at 21:41










  • @zb226 - Would anything else cause the issue?
    – PeanutsMonkey
    Aug 26 '12 at 23:16










  • Tried it on another machine today and it works there as well (exactly as stated above). Did you download it from here? For reference, the MD5 hash is 42badc1d2f03a8b1e4875740d3d49336.
    – zb226
    Aug 27 '12 at 10:30
















1












1








1







I am running the following command:



7z.exe a -t7z -m9=LZMA2 test.7z test.txt


However, I get this error: System error:The parameter is incorrect. The error only occurs if I use the -m9=LZMA2 or -m9=LZMA switches. If I remove it, it works perfectly fine. What am I doing wrong?



I am executing the command from Windows XP, 7 and 2008.










share|improve this question















I am running the following command:



7z.exe a -t7z -m9=LZMA2 test.7z test.txt


However, I get this error: System error:The parameter is incorrect. The error only occurs if I use the -m9=LZMA2 or -m9=LZMA switches. If I remove it, it works perfectly fine. What am I doing wrong?



I am executing the command from Windows XP, 7 and 2008.







windows 7-zip






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 26 '12 at 21:10









Indrek

20.4k117484




20.4k117484










asked Aug 26 '12 at 20:49









PeanutsMonkey

3,8302579118




3,8302579118












  • Your command works on my end - which version of 7zip are you using?
    – zb226
    Aug 26 '12 at 21:26










  • @zb226 - Version 9.20
    – PeanutsMonkey
    Aug 26 '12 at 21:35






  • 1




    Weird, that's the same version I'm using... If I change LZMA2 to something bogus, like xyz, I get the The parameter is incorrect. error... And using LZMA works too, btw.
    – zb226
    Aug 26 '12 at 21:41










  • @zb226 - Would anything else cause the issue?
    – PeanutsMonkey
    Aug 26 '12 at 23:16










  • Tried it on another machine today and it works there as well (exactly as stated above). Did you download it from here? For reference, the MD5 hash is 42badc1d2f03a8b1e4875740d3d49336.
    – zb226
    Aug 27 '12 at 10:30




















  • Your command works on my end - which version of 7zip are you using?
    – zb226
    Aug 26 '12 at 21:26










  • @zb226 - Version 9.20
    – PeanutsMonkey
    Aug 26 '12 at 21:35






  • 1




    Weird, that's the same version I'm using... If I change LZMA2 to something bogus, like xyz, I get the The parameter is incorrect. error... And using LZMA works too, btw.
    – zb226
    Aug 26 '12 at 21:41










  • @zb226 - Would anything else cause the issue?
    – PeanutsMonkey
    Aug 26 '12 at 23:16










  • Tried it on another machine today and it works there as well (exactly as stated above). Did you download it from here? For reference, the MD5 hash is 42badc1d2f03a8b1e4875740d3d49336.
    – zb226
    Aug 27 '12 at 10:30


















Your command works on my end - which version of 7zip are you using?
– zb226
Aug 26 '12 at 21:26




Your command works on my end - which version of 7zip are you using?
– zb226
Aug 26 '12 at 21:26












@zb226 - Version 9.20
– PeanutsMonkey
Aug 26 '12 at 21:35




@zb226 - Version 9.20
– PeanutsMonkey
Aug 26 '12 at 21:35




1




1




Weird, that's the same version I'm using... If I change LZMA2 to something bogus, like xyz, I get the The parameter is incorrect. error... And using LZMA works too, btw.
– zb226
Aug 26 '12 at 21:41




Weird, that's the same version I'm using... If I change LZMA2 to something bogus, like xyz, I get the The parameter is incorrect. error... And using LZMA works too, btw.
– zb226
Aug 26 '12 at 21:41












@zb226 - Would anything else cause the issue?
– PeanutsMonkey
Aug 26 '12 at 23:16




@zb226 - Would anything else cause the issue?
– PeanutsMonkey
Aug 26 '12 at 23:16












Tried it on another machine today and it works there as well (exactly as stated above). Did you download it from here? For reference, the MD5 hash is 42badc1d2f03a8b1e4875740d3d49336.
– zb226
Aug 27 '12 at 10:30






Tried it on another machine today and it works there as well (exactly as stated above). Did you download it from here? For reference, the MD5 hash is 42badc1d2f03a8b1e4875740d3d49336.
– zb226
Aug 27 '12 at 10:30












1 Answer
1






active

oldest

votes


















0














I believe you're misinterpreting the meaning of the -m? switch...
-m9=lzma2 doesn't give you better compression than -m0=lzma2, that's the -mx switch.



Try this instead:



7za a -t7z -m0=lzma2 -mx=9 archive.7z files





share|improve this answer























  • Nowadays, with 7z 7-Zip [64] 9.20 under Linux, the options -m9=lzma2 and -m0=lzma2 lead to different files with different sizes, is it so even for windows?
    – Hastur
    Jul 18 '16 at 10:31











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f466669%2fincorrect-parameter-error-when-using-7-zip-from-the-command-line-in-windows%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














I believe you're misinterpreting the meaning of the -m? switch...
-m9=lzma2 doesn't give you better compression than -m0=lzma2, that's the -mx switch.



Try this instead:



7za a -t7z -m0=lzma2 -mx=9 archive.7z files





share|improve this answer























  • Nowadays, with 7z 7-Zip [64] 9.20 under Linux, the options -m9=lzma2 and -m0=lzma2 lead to different files with different sizes, is it so even for windows?
    – Hastur
    Jul 18 '16 at 10:31
















0














I believe you're misinterpreting the meaning of the -m? switch...
-m9=lzma2 doesn't give you better compression than -m0=lzma2, that's the -mx switch.



Try this instead:



7za a -t7z -m0=lzma2 -mx=9 archive.7z files





share|improve this answer























  • Nowadays, with 7z 7-Zip [64] 9.20 under Linux, the options -m9=lzma2 and -m0=lzma2 lead to different files with different sizes, is it so even for windows?
    – Hastur
    Jul 18 '16 at 10:31














0












0








0






I believe you're misinterpreting the meaning of the -m? switch...
-m9=lzma2 doesn't give you better compression than -m0=lzma2, that's the -mx switch.



Try this instead:



7za a -t7z -m0=lzma2 -mx=9 archive.7z files





share|improve this answer














I believe you're misinterpreting the meaning of the -m? switch...
-m9=lzma2 doesn't give you better compression than -m0=lzma2, that's the -mx switch.



Try this instead:



7za a -t7z -m0=lzma2 -mx=9 archive.7z files






share|improve this answer














share|improve this answer



share|improve this answer








edited Jul 18 '16 at 10:29









Hastur

13.1k53267




13.1k53267










answered Dec 10 '13 at 2:28









kronenpj

468410




468410












  • Nowadays, with 7z 7-Zip [64] 9.20 under Linux, the options -m9=lzma2 and -m0=lzma2 lead to different files with different sizes, is it so even for windows?
    – Hastur
    Jul 18 '16 at 10:31


















  • Nowadays, with 7z 7-Zip [64] 9.20 under Linux, the options -m9=lzma2 and -m0=lzma2 lead to different files with different sizes, is it so even for windows?
    – Hastur
    Jul 18 '16 at 10:31
















Nowadays, with 7z 7-Zip [64] 9.20 under Linux, the options -m9=lzma2 and -m0=lzma2 lead to different files with different sizes, is it so even for windows?
– Hastur
Jul 18 '16 at 10:31




Nowadays, with 7z 7-Zip [64] 9.20 under Linux, the options -m9=lzma2 and -m0=lzma2 lead to different files with different sizes, is it so even for windows?
– Hastur
Jul 18 '16 at 10:31


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f466669%2fincorrect-parameter-error-when-using-7-zip-from-the-command-line-in-windows%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Plaza Victoria

Brian Clough

Cáceres