View Full Version : Custom Action to copy file to INSTALLDIR?

11-07-2005, 04:55 PM
We're distributing a customer unique .dat file alongside our setup.exe. We've done this to allow for quickpatching and reduce the need of rebuilding our project over and over.

Is there a simple way to just copy this file into the INSTALLDIR without using VBScript? (A number of our customers have older OS's without the scripting engine; others have unreg'd scrrun.dll per Norton's recommendation.)

I assume a VB EXE would be the easiest; however, I can't find info on how to access Session.Property("INSTALLDIR"). Does anyone else know? Is there an easier way to accomplish this task?

Thanks for the help!


11-08-2005, 11:28 AM
You cannot pass the session object to a custom action EXE, but you should be able to pass "[INSTALLDIR]" and such as command line arguments. Depending on your needs (and willingness to show a rapidly disappearing command prompt window), another option would be to use this idea directly with xcopy.exe instead. Don't forget a corresponding custom action to delete the file on uninstall, unless it is meant to linger.