Copy files to installation-directory using WPS 7 and MSI

Polarman's picture

I want to copy 2 dirs to the installation directory on the C:\program files\INSTALLDIR after the installation has finished.
How do I set this in the MSI file?? The files/dirs should be copied from the sourcepath (UNC  \\) to the source destination on the client computer.

Knut 

VBScab's picture

You need to write a Custom Action

There are many many scripts around which you can use to copy a folder. Add one as a Custom Action.

I'm wondering, though, why you'd need to perform this operation after the install is complete. Surely all the information that you'd need after completion is available beforehand and thus could be used to copy these files as part of the install.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

Polarman's picture

 Yes, but how do you copy

 Yes, but how do you copy them to the installdir\EXAMPLEDIR?
The files needs to be copied after the installation has finished because they are specific for our company.

CustomAction? I dont want to make a .bat-file which copies the files manually to the target-dir.. But hopefully the msi-installation could do that somehow..

VBScab's picture

So

>The files needs to be copied after the installation has finished because they are specific for our company.

So I'm guessing you have a vendor-supplied MSI? Simple: add your cusom files with a transform. Remember that WPS will create an external CAB for these files so you'll need to distribute that CAB with the MSI/MST.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

EdT's picture

Copying files after install has finished

A custom action will be required to perform any installation steps after the installation has finished. Once InstallFinalize has completed, all rollback information is deleted and the availability of property values is also limited.
As VBScab has suggested, deploying the files using a transform is the most reliable way - and also offers the advantage that you don't need to script another custom action to handle the uninstall of the additional files. 

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.