Link to home
Create AccountLog in
Avatar of Eduardo Fuerte
Eduardo FuerteFlag for Brazil

asked on

Could you point how to correctly script to make nullsoft scriptable installer consider the subfolders?

Hi Experts

I'm using nullsoft scriptable installer.

I need that the instalation consider subfolders accordingly to:

User generated image
Could you point how to correctly script to make the instalation consider the subfolders?

Thanks in advance.
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

The /r parameter on the File command will recurse into all subfolders. So this install section should do it:

section "install"
  SetOutPath $INSTDIR
  File /r Bibliesp
sectionEnd

Open in new window

Regards, Joe
Avatar of Eduardo Fuerte

ASKER

Hi

I don't know if I did it correctly.

The script used:
  SetOutPath "$INSTDIR"
  File /r "Main Program"
  FileWrite $R0 "Install directory is $INSTDIR. $\r$\n"
...

  InstallDir "C:\Bibliesp\"

Open in new window


The Nullsoft instalation folders:
User generated image
The error I had:
User generated image
Any other sugestion?
Here is the complete script
p3Biblioteca_FULL_v1.nsi
It says:

"Main Program" -> no files found.

In the file /r command you should specify the name of the root folder. For example, here's a small, working script that will install "root folder" and all of its subfolders:

InstallDir "$PROGRAMFILES\Test Installing Subfolders"
Name "Test Subfolders"
OutFile "Setup.exe"
section "install"
  SetOutPath $INSTDIR
  file /r "root folder"
sectionEnd

Open in new window

The above installer works — try it. It will create a Setup.exe that installs root folder and all its subfolders (and all files) in $PROGRAMFILES\Test Installing Subfolders (such as c:\Program Files (x86)\Test Installing Subfolders on a 64-bit system). Regards, Joe
ASKER CERTIFIED SOLUTION
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Hi @Joe

I didn't intend you check all the script file, I attached it just in case any other information eventally had  beeing needed.

Following what you posted, I just made a minor change the instalation folder to:

User generated image
File /r "c:\A_Instala_Biblioteca_V1\A_Instala_Biblioteca_FULL_V1\Bibliesp"

Open in new window


Install the package and the instalation is:

User generated image
That attended my needs.
> That attended my needs.

That's great news, Eduardo! I'm glad to hear that the problem is resolved. Regards, Joe
Joe as usual you give a very good help!

Thank you.
You're welcome, Eduardo. And thanks to you for the nice compliment — I appreciate hearing it! Regards, Joe