Solved

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

Posted on 2016-08-26
9
68 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
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
SuperAntiSpyware Licenses Discounted by 25% !

Exclusive offer to Experts Exchange Members!
Buy SuperAntiSpyware License(s) from us and save 25% on the regular purchase price.
- Includes Full SuperAntiSpyware Vendor Support Entitlements
- Your Subscription does not begin until you activate your license
- Buy for your friends

 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
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 54

Accepted Solution

by:
Joe Winograd, EE MVE earned 500 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 54

Expert Comment

by:Joe Winograd, EE MVE
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 54

Expert Comment

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

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

752 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