views:

30

answers:

1

I want to copy a file that's in the same directory as the installer file to the application directory. I can't include the file in the installer.

the scenario: I create an installer for my client. the client will distribute the installer to an unknown number of third parties, these third parties will need to change an aspect of the configuration for the application. they will subsequently distribute the installer with their edited config to an unknown number of end users. The end users need to be able to just double click the installer, no knowledge on their part can be assumed. I can't/don't want to create a separate installer for every third party that will distribute the application.

The solution I've come up with is letting these third parties add a config file to be distributed together with the installer. This file will be copied to the application dir on installation. I created a custom installer class for this purpose.

The part where I am stuck is how to find the file. All the provided methods to find the active assembly etc inside the installer class seem to point to a directory inside Window\system32, instead of the original directory where the installer was launched from.

Any help greatly appreciated.

+2  A: 

Is this what you are after? You pass custom data to the custom action, using one of the built-in, but hard to find parameters available when you design setup projects in Visual Studio.

http://adamhouldsworth.blogspot.com/2010/01/get-msi-location-during-setup.html

Adam
Thanks this proved to be exactly what I was looking for
markchagers