In a standard Setup project for a WinForms app I would like to programmatically change the default installation folder (i.e. do this when the installation happens).
Is there a way to do this? I thought using a custom Installer class might hep me with this but it seems by the time it gets to any custom actions in that class, the install folder has already been selected.
I had the same problem. Here Is my solution.
I created an additional project, which called Win msi intaller, and add the TARGETDIR property’s value as an argument.
Then you should run this program to install your msi package.