如何在安装程序包中添加目录和子目录

时间:2020-03-09 07:36:59

标签: nsis

我有许多文件和文件夹要添加到我的安装包中。我尝试过命令

文件/ nonfatal / a / r“ C:\ Users \ test \ hdp *”

文件/ nonfatal / a / r“ C:\ Users \ test \ hdp \”

,但未创建输出文件(.exe)。我还尝试了zip文件(意味着创建了hdp文件夹的zip文件)并将其添加到程序包中,但是我面对的也是zip文件。 hdp文件夹大小仅为250MB。

在文档中也没有提到添加文件夹的选项。有人可以建议如何将这些文件夹和子文件夹添加到包中吗?

1 个答案:

答案 0 :(得分:1)

在尝试编写真正的安装程序之前,您应该从Example1.nsi开始并了解其所有说明。

OutFile "myinstaller.exe" ; Name of generated installer .exe
InstallDir "$Desktop\MyApp" ; Change this

Page Directory
Page InstFiles

Section
SetOutPath $InstDir
File /r "c:\users\test\myfilestoinstall\*.*" ; Change this
SectionEnd