4
votes

I've created my self extracting .exe file from 7zip command line using the

7z a -sfx <name.exe> <filelist...>

commands but when I run this from windows explorer it does not ask me for the location to extract the files to, it just places it inside the current directory.

The target users will not be command line savvy so I don't want them to have to open a prompt and use the command line options to put it in a certain directory.

The non command line 7zip has the functionality I'm looking for when checking the box to Create SFX archive file, But the command line does not seem to have it.

As a last resort I can make a .bat script that will call

7z x -o<location> <name.exe>

But I'm trying to avoid that as the users are used to installing form just the executable.

3

3 Answers

0
votes

It seems that if you 7z from the command line, the resulting exe doesn't prompt. But if you use the 7-Zip File Manage, the exe does prompt you.

I don't know why.

0
votes