Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Custom Action For Copy Files to InstallDIR

2 replies to this topic


  • Full Members
  • 4 posts

Posted 17 July 2014 - 06:52




As part of MSI installation, I have to move some files from user local directory to INSTALLDIR location.


Please guide me, how I can write custom action for moving files to  INSTALLDIR at the time of installation.






  • Full Members
  • 436 posts

Posted 17 July 2014 - 08:04

Why not do it the proper way and use the MoveFile table? http://msdn.microsof...5(v=vs.85).aspx,

Remember that, as this is user-based activity, the component for the MoveFile part will need to be in a new feature which you will need to make the parent of an existing feature which contains an adevrtised entry-point (normally, an advertised shortcut, of course). Activation of the entry-point will then trigger self-healing and install the files to the currently logged-in user's profile.

For help with self-healing, Google for John McFadyen's excellent blog on the subject.

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.


  • Moderators
  • 1,447 posts

Posted 17 July 2014 - 12:59

As VBScab says, the MoveFile table in MSI would seem to be able to do what you need. However, it would also be helpful if you specify why you need to move these files. Most of the time we find that unusual setup designs cause a lot of unnecessary complexity, and the problem can often be avoided by small changes in application design.

Edited by Glytzhkof, 17 July 2014 - 13:00.

-Stein Åsmul