Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-08-26
9
Medium Priority
?
81 Views
Last Modified: 2016-08-27
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.
0
Comment
Question by:Eduardo Fuerte
  • 5
  • 4
9 Comments
 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 41772499
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
0
 

Author Comment

by:Eduardo Fuerte
ID: 41772928
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?
0
 

Author Comment

by:Eduardo Fuerte
ID: 41772939
Here is the complete script
p3Biblioteca_FULL_v1.nsi
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 41772941
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
0
 
LVL 56

Accepted Solution

by:
Joe Winograd, EE MVE 2015&2016 earned 2000 total points
ID: 41772953
Our messages crossed. I did not study your entire 395-line script, but based on the installation folder structure you just posted, I think that all you need to do is change your file /r command to this:

File /r "c:\A_Instala_Biblioteca_V1"

Open in new window


Of course, in a 395-line script, there could be other issues, but your File /r "Main Program" is clearly the first problem. Regards, Joe
0
 

Author Comment

by:Eduardo Fuerte
ID: 41773081
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.
0
 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 41773088
> That attended my needs.

That's great news, Eduardo! I'm glad to hear that the problem is resolved. Regards, Joe
0
 

Author Closing Comment

by:Eduardo Fuerte
ID: 41773114
Joe as usual you give a very good help!

Thank you.
0
 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 41773118
You're welcome, Eduardo. And thanks to you for the nice compliment — I appreciate hearing it! Regards, Joe
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question