Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to make an password protected SFX archive (non GUI) and extract it by giving a password via command line ?

Do any of the archive formats support this ? I couldn't find any.

Preferably, I want either 7z, FreeArc or any other high compression format ?

Hope I made it clear.

share|improve this question
You might look at 7-zip's command-line version(s)—see I believe I was able to do this once upon a time, but it's been a while . . . . p7zip also worked when I last tried it a long time ago. – zpletan Sep 10 '11 at 2:47
up vote 2 down vote accepted

Use 7zip.

7z a -p -sfx archivename

Will create a self-extracting compressed archive with archive name as archivename.exe You'll be prompted to enter the password upon compressing & extracting, else you can provide it as part of the command itself

share|improve this answer
I know how to create one...I wanna be able to extract it via command line, say in a batch file like: sfxname.exe password something like that, is it possible with any ? – untilTHEend Sep 10 '11 at 4:04
that works with the archive created using above command – Sathya Sep 10 '11 at 4:08
Thanks, it works, is it possible for FreeArc ? – untilTHEend Sep 22 '11 at 2:02
@untilTHEend according to their site it should be possible, but I haven't tried it. – Sathya Sep 22 '11 at 4:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .