7zip 命令行自解压程序不询问路径
我已经使用命令从 7zip 命令行创建了自解压 .exe 文件,
7z a -sfx <name.exe> <filelist...>
但是当我从 Windows 资源管理器运行此文件时,它不会询问我将文件解压到的位置,它只是将其放置在当前目录中。
目标用户不会精通命令行,因此我不希望他们必须打开提示并使用命令行选项将其放入某个目录中。
非命令行 7zip 具有我在选中“创建 SFX 存档文件”框时正在寻找的功能,但命令行似乎没有该功能。
作为最后的手段,我可以制作一个 .bat 脚本来调用
7z x -o<location> <name.exe>
但我试图避免这种情况,因为用户习惯于仅安装可执行文件。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
http://sourceforge.net/projects/sevenzip/forums/forum/45798 /主题/3777973
http://sourceforge.net/projects/sevenzip/forums/forum/45798/topic/3777973
似乎如果您从命令行输入 7z,生成的 exe 不会提示。但如果您使用 7-Zip 文件管理器,该 exe 会提示您。
我不知道为什么。
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.
您可以使用(稍微过时的)修改后的 SFX 模块,支持 提示解压路径。
You can use the (slightly dated) modified SFX modules that support prompting for the extracting path.