• 周五. 3月 29th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

Winform打包Exe Inno Setup

admin

11月 28, 2021

9.下载安装Inno Setup

下载地址:https://pc.qq.com/detail/13/detail_1313.html

安装完成以后打开Inno Setup客户端

a. file->new,新建脚本

b.填写应用程序信息,黑体为必填项

Application name: 应用名称;

Application version:应用版本;

Application publisher:发行单位(可选);

Application websiter:应用程序网址(可选);

c.完善应用文件信息

Application destination base folder:应用程序目标基本文件夹,可默认也可自定义;

Application folder name:应用文件夹名称;

Allow user to change the application folder:勾选,允许用户自定义安装位置;

d.指定属于应用程序的文件

Application main executable file:应用程序主执行文件,即第8步中打包生成的.exe文件;

Allow user to start the application after Setup has finished:允许用户在安装完成后启动应用程序;

Add folders:添加应用程序文件,选择第8步中打包出的文件根目录即可,要把所有.dll文件及其他配置文件都包含进去;

点击添加之后可以看到:

文件目录以自己的实际情况为准。

e.指定应用程序的快捷方式,勾选默认的两项即可,即“创建主执行程序的快捷方式到公共开始菜单程序文件夹”、“允许用户创建桌面快捷方式”

f.指定安装期间要显示的文档文件

License file:许可文件;

Information file shown before installation:安装之前显示信息文件;

Information file shown after installation:安装之后显示信息文件;

g.指定应包括的安装语言(汉化版的有简体中文选项),选择之后点击下一步

h.指定基本编译设置

Custom compiler output folder:自定义编译器输出文件夹,即最终编译出的安装包要放哪个位置;

Compiler output base file name:编辑器输出基本文件名,即安装包名称;

Custom Setup icon file:自定义安装程序图标文件;

Setup password:安装密码;

i.点击下一步

剩下的就是一路确定了,会询问你在编译之前要不要保存你的脚本(上面的配置步骤,最终会生成一个编译脚本文件),点击保存,先不要编译,打开脚本文件,新增配置项,修改注册表,设置开机自启动:

[Registry]
Root: HKLM; Subkey: "SOFTWAREMicrosoftWindowsCurrentVersionRun"; ValueType: string; ValueName: "testrun"; ValueData: "{app}{#MyAppExeName}"

然后,执行编译文件:build->compile

至此,所有步骤已经完成了,赶快去看看你的安装包能不能正常使用吧。

《Winform打包Exe Inno Setup》有一个想法
  1. Wow, incredible blog layout! How long have you ever been blogging for?
    you made running a blog glance easy. The full look
    of your website is great, as well as the content material!
    You can see similar here e-commerce

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注