How do you Copy files from Support files

Got a problem you cannot solve? Try here.
Post Reply
get101
Posts: 48
Joined: Wed May 16, 2007 1:58 am

How do you Copy files from Support files

Post by get101 »

I have files that contain country specific information. For example, sUS.dbf is for the USA.

I put all these country specific files under Support files. During installation the appropriate one is copied to $TARGETDIR$, and its name changed.

This code is above the Apply Install line.

Code: Select all

 Delete Files $TARGETDIR$\\sa.dbf (when installing)
          Copy Local Files $SUPPORTDIR$\\sUS.dbf to $TARGETDIR$\\sa.dbf
          
The problem is that this does not work. Can you help me understand where I have gone wrong?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

It's probably Delete Files that's interfering (remember, all purple [MSI] commands apply simultaneously when Apply Install is called, not before).

So you can call DeleteFilesA in kernel32.dll using Call DLL Function to immediately delete the file in question, without going through MSI for that one.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
get101
Posts: 48
Joined: Wed May 16, 2007 1:58 am

Post by get101 »

Thanks for the reply. That helped me resolve it.

Question: if a file of the same name already exists, is there a way to get the Copy File to overwrite the existing file?
Post Reply