PDA

View Full Version : Install file question



NewsArchive
07-11-2017, 01:49 AM
Is there anyway to install a file in an installer only if it exists? For
example, I have the code in the attached image in a script. I only want
it to install if the variable is equals 1. And the file is only included
in the source folder it is needed.

I am getting an error stating that the file does not exist and compile
aborts. Is there an "If exists" method I'm missing.

TIA,

Bob

NewsArchive
07-11-2017, 01:50 AM
Be sure you understand the difference between a runtime variable and a
compiler variable, Bob. On the home screen, there's a link for "Learning
Setupbuilder." You might read the "Names-Variables" section there.

Your runtime variable is not evaluated until the end-user runs your
installer.

One possibility would be to wrap the code in your screenshot inside a
#iffile block.

"The #iffile conditional-directive determines if a particular file or
directory does or does not exist on the development computer. You can use
the conditional-directive to mark the beginning of the block of code that
will only be compiled conditionally."

jf

NewsArchive
07-12-2017, 01:54 AM
Jane,
"#iffile" did the trick. I guess I better go read the manual which I
haven't done for a few years.

Thank you.

Bob