How do you Copy files from Support files

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

How do you Copy files from Support files

Postby get101 » Tue Jul 03, 2007 1:46 am

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:

Postby MichaelNesmith » Tue Jul 03, 2007 3:39 am

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
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

get101
Posts: 48
Joined: Wed May 16, 2007 1:58 am

Postby get101 » Wed Jul 04, 2007 5:38 pm

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?


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 57 guests