Kugel
Kugel

Reputation: 19824

How to compute destination path for a file in InnoSetup dynamicaly?

I need to compute destination path for a file before copying. If the path does not exist I won't copy the file during installation.

Is this possible?

For example, can I call some computepath.exe an store the result into a variable?

Upvotes: 0

Views: 491

Answers (1)

jachguate
jachguate

Reputation: 17203

You do not need to call a external program for that. Almost any computation can be done using pascal script, and you can then use the FileOrDirExists() function to determine if the path exists.

If that is not enough, you can take a different approach: extract the file to a temporary directory and call a computepathandcopy.exe passing the temp file name as a parameter. The exe will compute the path, check if it exists and perform the file copy.

Upvotes: 2

Related Questions