Archive: Script compilation problem (File command)


Script compilation problem (File command)
Hello,
I got the following problem with nsis script.
I am trying to install files, that I am not sure exists.
For example

...
Setoutpath "$InstallDir"
File "C:\Program Files\ExampleFile.ini"

Setoutpath "$InstallDir"
File "C:\Program Files\ExampleFile1.ini" -> This file exists, but not always?

I tried to use below construction, but NSIS still report error, that this file doesn't exist and break the compilation - I am trying to write that if file exist, then install it - if file doesn't exist do nothing.

If FileExists "C:\Program Files\ExampleFile1.ini" 0 +3
Setoutpath "$InstallDir"
File "C:\Program Files\ExampleFile1.ini"

So How to compile script with this line of code, in situation that examplefile1.ini doesn't exist:

Setoutpath "$InstallDir"
File "C:\Program Files\ExampleFile1.ini"

This file exist, for example for english language version of my program, but not for french, for example.

I hope you understand my problem.
Regards,
-Pawel


He, I found a solution.
I used switch /nonfatal for File command.
Now, the script is compiling. Does somebody know how to eliminate warnings messages at output? Is it possible?
Regards
-Pawel


There's no way to get rid of the /nonfatal warning without getting rid of all warnings.