33

I have an application which consists one .exe, many .dlls and a few folders.

I use NSIS to create an installer. It works but when I install the software, I don't see all the folders inside my application. What do I have to do to bundle all the folders within my application into the installer?

This is the code I set the data source at this time:

File "c:\MyProject\MyApp\*"
Danny Broadbent
  • 1,199
  • 1
  • 9
  • 21
AustinTX
  • 1,322
  • 4
  • 21
  • 28

1 Answers1

60

The documentation tells us that the /r argument of the File command includes all sub folders and files. So you would use something like this:

File /r "c:\MyProject\MyApp\*"

The relevant section of the documentation can be found here:

http://nsis.sourceforge.net/Docs/Chapter4.html#file

krispy
  • 1,244
  • 14
  • 19
Paul Hunt
  • 3,395
  • 2
  • 24
  • 39
  • 1
    When using the /r switch, both matching directories and files will be searched. *This is always done with or without the use of wildcards*. http://nsis.sourceforge.net/Docs/Chapter4.html#file – MAbraham1 Mar 21 '17 at 13:10
  • Won't this cause problems with an uninstaller? As you can't delete * as you need to wait for uninstaller.exe to be last? – Simon Unsworth Jan 31 '19 at 12:13