Page 1 of 1

Copy Local Files doesn't!

Posted: Mon Feb 13, 2006 5:19 pm
by mjjnl
Hi,

We are trying to use the following expression to make a second copy of a file that has been previously installed by an external installer called from within the setup script we are writing. For some reason

Copy Local Files "$PROGRAMFILES$\\X\\X Y Z\\A\\B.pdf" to $TARGETDIR$\\X\\Y\\B.pdf

doesn't work. However, if we put the equivalent copy expression in a batch file that is called at the end of the installation (for other reasons), it works fine.

Any ideas? We have tried with and without quotes.

Posted: Mon Feb 13, 2006 5:32 pm
by MichaelNesmith
Hi!

Are you calling Copy Local Files before Apply Install?

Posted: Mon Feb 13, 2006 5:44 pm
by mjjnl
No, we call it after Apply Install - should we be calling it before hand?

Posted: Mon Feb 13, 2006 7:33 pm
by MichaelNesmith
All purple commands are executed natively by the Windows Installer engine. They take effect only when Apply Install is called. If you call them after Apply Install, you will need to call Apply Install again - but this will slow down your setup as Windows Installer will be invoked twice.

If the files that you wish to copy locally are being installed by your setup, install them using Install Files. If the files you wish to copy locally are already present, use Copy/Move Local Files - remembering to place before Apply Install. If the files you wish to copy locally are not being installed by your setup but are somehow created after Apply Install, use Call DLL Function with CopyFileA or the MoveFileA Win32 API in kernel32.dll.

One of those suggestions should help you out! Let me know if you still have problems.