首页 > 解决方案 > How to add directory and sub directories in installer package

问题描述

I have many files and folders to be added to my installation package. I tried command

File /nonfatal /a /r "C:\Users\test\hdp*"

and

File /nonfatal /a /r "C:\Users\test\hdp\"

but it didn't create the output file(.exe). I also tried with zip file (means created zip file of hdp folder) and add it into package but the same issue i am facing with zip file also. hdp folder size is 250MB only.

In documentation also no option is mentioned to add folder. Can someone suggest how to add these folder and subfolders to the package?

标签: nsis

解决方案


在尝试编写真正的安装程序之前,您应该从 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

推荐阅读