如何制作自解压和运行安装程序 [英] How do I make a self extract and running installer

查看:32
本文介绍了如何制作自解压和运行安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以目前我的用户下载一个 zip 文件,解压缩它,然后运行 ​​setup.exe - 我希望他们一键完成.使用 http://www.wikihow.com/Use-7Zip-to-Create-Self-Extracting-excutables 我可以制作一个自解压的 exe,但它实际上并不运行安装程序.

So currently my users download a zipfile, unzip it and then run setup.exe - I would like them to do this with one click. Using http://www.wikihow.com/Use-7Zip-to-Create-Self-Extracting-excutables i can make a self-extracting exe, but it doesn't actually run the installer.

从这个问题

为什么 7zip 在以下情况下忽略我的 InstallPath制作 SFX 安装程序?

看来我还需要一个 .sfx 文件,所以我从另一个问题中复制并创建了一个包含以下内容的文件

it seems I also need an .sfx file so I copied from the other question and created one with the following contents

;!@Install@!UTF-8!
InstallPath="C:\test"
GUIMode="2"
RunProgram="setup.exe"
;!@InstallEnd@!

并调用 setup.sfx 并将其与其他文件一起添加到存档

and called setup.sfx and add this to archive together with the other files

setup.ini
setup.exe
setup.ico
install.jar
JVM32 (folder)

但这没什么区别,我还需要做什么.

but it made no difference, what else do I need to do.

补充问题,我也有WinRar,使用7Zip还是Winrar对终端用户体验有影响吗?

Supplementary question, I also have WinRar, does it effect the end user experience whether I use 7Zip or Winrar ?

推荐答案

好的,我已经搞定了,希望这些信息有用.

Okay I have got it working, hope this information is useful.

  1. 首先,我现在意识到,自解压 zip 不仅可以通过双击开始解压,而且它们不需要在用户计算机上安装解压应用程序,因为提取器代码在存档本身中.这意味着您将获得不同的用户体验,具体取决于您用于创建 sfx 的应用程序

  1. First of all I now realize that not only do self-extracting zip start extracting with doubleclick, but they require no extraction application to be installed on the users computer because the extractor code is in the archive itself. This means that you will get a different user experience depending on what you application you use to create the sfx

我使用 WinRar 如下,这不需要您创建 sfx 文件,一切都可以通过 gui 创建:

I went with WinRar as follows, this does not require you to create an sfx file, everything can be created via the gui:

  • 选择文件,右键单击并选择添加到存档
  • 使用 Browse.. 在上面的文件夹中创建存档
  • 将存档格式更改为 Zip
  • 启用创建 SFX 存档
  • 选择高级标签
  • 选择 SFX 选项
  • 选择设置标签
  • 提取后运行字段中输入 setup.exe
  • 选择模式标签
  • 启用解压到临时文件夹
  • 选择文本和图标选项卡
  • 为您的任务输入更合适的标题
  • 选择确定
  • 选择确定
  • Select files, right click and select Add to Archive
  • Use Browse.. to create the archive in the folder above
  • Change Archive Format to Zip
  • Enable Create SFX archive
  • Select Advanced tab
  • Select SFX Options
  • Select Setup tab
  • Enter setup.exe into the Run after Extraction field
  • Select Modes tab
  • Enable Unpack to temporary folder
  • Select text and Icon tab
  • Enter a more appropriate title for your task
  • Select OK
  • Select OK

生成的 exe 解压到一个临时文件夹,然后启动安装程序

The resultant exe unzips to a temporary folder and then starts the installer

这篇关于如何制作自解压和运行安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆