cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dmetzler
Level 6

MSI installer with external files

I have an .msi installer working. Now we would like to include various files that would be external to the .msi, and include those files over the ones in the installer.

Can this be done? I know that there will be an .xml file and several image files with known filenames that should be copied during the installation from the external source.

Thanks in advance,

Don Metzler
Labels (1)
0 Kudos
(6) Replies
Nick_Umanski
Level 7

Yes it can - add entries to the MoveFile table. For the SourceFolder entry you can use SETUPEXEDIR (Setup.exe) Or SOURCEDIR (.msi file) to get the location where your Setup.exe or .MSI file is located assuming your external files are co-located.

Note though that the MoveFiles action by default is before the InstallFiles action, so if you want them to overwrite an installed file you need to condition out the component installing the files or reschedule the MoveFile action to after. Remember not to set any of these files as Key Files or they will get overwritten again on a Modify/Repair.
0 Kudos
dmetzler
Level 6

Nick Umanski wrote:
Yes it can - add entries to the MoveFile table. For the SourceFolder entry you can use SETUPEXEDIR (Setup.exe) Or SOURCEDIR (.msi file) to get the location where your Setup.exe or .MSI file is located assuming your external files are co-located.

Note though that the MoveFiles action by default is before the InstallFiles action, so if you want them to overwrite an installed file you need to condition out the component installing the files or reschedule the MoveFile action to after. Remember not to set any of these files as Key Files or they will get overwritten again on a Modify/Repair.


Thanks for the information.

My installer project is a Basic MSI Project and I am not seeing how to add entries to the MoveFile table.

Thanks,

Don
0 Kudos
Nick_Umanski
Level 7

All my installer are basic MSI ones.

Use the Direct Editor to add entries to the MoveFile table.
0 Kudos
dmetzler
Level 6

Nick Umanski wrote:
All my installer are basic MSI ones.

Use the Direct Editor to add entries to the MoveFile table.


Thanks. This is what I needed.

Regards,

Don
0 Kudos
dmetzler
Level 6

Nick Umanski wrote:
Yes it can - add entries to the MoveFile table. For the SourceFolder entry you can use SETUPEXEDIR (Setup.exe) Or SOURCEDIR (.msi file) to get the location where your Setup.exe or .MSI file is located assuming your external files are co-located.

Note though that the MoveFiles action by default is before the InstallFiles action, so if you want them to overwrite an installed file you need to condition out the component installing the files or reschedule the MoveFile action to after. Remember not to set any of these files as Key Files or they will get overwritten again on a Modify/Repair.


I want to set the SourceFolder to the location where the .msi is located when it is run, and the DestFolder to the location [ProgramFilesFolder]MyProgram\Data.

1) Is there a variable to determine where the source .msi is located?

2) The MoveFiles table does not allow the '[' or ']' character. How can I set the DestFolder to the path: [ProgramFilesFolder]MyProgram\Data ?

Thanks,

Don
0 Kudos
Matthias1967
Level 5

You should use the Directory table to set up the destination path.
0 Kudos