User-2097060974 posted
Actually, the way I have my project set up, I use the Install phase and have no override for the Commit phase, so I do not believe that is accurate.
For each of the phases, in the Custom Actions section, I right-click and select Add > Add Custom Action... then select Application Folder in the dialog, then "Primary output from MyApp (Active)".
For each of the phases, when I select "Primary output from MyApp (Active)", my InstallerClass property is True (I've seen other posts saying to change this to False - it is not necessary).
For the Install phase, you select "Primary output from MyApp (Active)" and that is when you can set your CustomActionData string variables that you are gathering from dialog forms. For me, I added Textboxes A and B forms in the User Interface section.
On A, I had one textbox, EDITA1. It was for the path of a file, so the variable is "filepath". On B, I had 2 boxes, EDITB1 and EDITB2. These were assigned variables "host" and "port", as they were for some database information
for my app to connect to upon installation.
My CustomActionData string:
/filepath="[EDITA1]" /host="[EDITB1]" /port="[EDITB2]"
I ran into the error you did because I had left off a closing quote on one of the textboxes, with one error before it complaining it couldn't load a file or assembly from ///file:\C:\Windows\SYSWOW64\Files - without telling me what the file or assembly was.
Once I fixed the quote issue and re-built the Setup Project, it installed fine.
So for the installer class, you really only need to override the Install method. The rest will do what they would always do. It is only during Install that you would grab the parameters and do something with them, for ex.:
string filepath = Context.Parameters["filepath"];
You don't have to do anything twice.