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

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

问题描述

因此,当前我的用户下载了一个zip文件,将其解压缩,然后运行setup.exe-我希望他们单击​​一下即可。使用 http://www.wikihow.com/Use-7Zip- to-Create-Self-Extracting-executables 我可以制作一个自解压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制作SFX安装程序时会忽略我的InstallPath?

似乎我还需要一个.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不仅可以通过doubleclick开始提取,而且由于提取器代码位于存档本身中,因此不需要在用户计算机上安装提取应用程序。这意味着您将获得不同的用户体验,具体取决于用于创建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天全站免登陆