FG
💻 Software

What is 7-Zip’s command-line argument to create a self extracting archive?

Fresh7 days ago
Mar 15, 202629508 views
Confidence Score0%
0%

Problem

I looked everywhere and couldn't find a straight answer from anyone. If I want to package the contents of C:\Temp into a file called Temp.exe (in 7z format) that is self-extracting, how do I do it in a batch file? This doesn't work: What I get from that is a self extracting archive called 7z.sfx . …

Error Output

"C:\Program Files\7-Zip\7z.exe" a -t7z -mx5 -sfx 7z.sfx directoryname archive.exe -mmt

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: What is 7-Zip’s command-line argument to create a self extracting archive?

Low Risk

I figured it out after fiddling with it:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment