Avatar of Eduardo Fuerte
Eduardo Fuerte
Flag 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:

img001
Could you point how to correctly script to make the instalation consider the subfolders?

Thanks in advance.
InstallationWindows 7Software

Avatar of undefined
Last Comment
Joe Winograd

8/22/2022 - Mon
Joe Winograd

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
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:
img001
The error I had:
img002
Any other sugestion?
Eduardo Fuerte

ASKER
Here is the complete script
p3Biblioteca_FULL_v1.nsi
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Joe Winograd

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
Joe Winograd

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Eduardo Fuerte

ASKER
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:

img003
File /r "c:\A_Instala_Biblioteca_V1\A_Instala_Biblioteca_FULL_V1\Bibliesp"

Open in new window


Install the package and the instalation is:

img004
That attended my needs.
Joe Winograd

> That attended my needs.

That's great news, Eduardo! I'm glad to hear that the problem is resolved. Regards, Joe
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Eduardo Fuerte

ASKER
Joe as usual you give a very good help!

Thank you.
Joe Winograd

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