Solved

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

Posted on 2016-08-26
9
65 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 53

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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 53

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 53

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 53

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 53

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

821 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