In the project project, right-click the project and choose View> User Actions. Add a custom action. Now select Add Output, select the web service project and click OK.
Now select your custom action and set the CustomActionData property to something like /ProductName=[PRODUCTNAME] /whateveryouwant=[Whateveryouwant] (note that these are key-value pairs, that is, to access the product name, ProductName is key, and the value is ProductName ).
Note that CustomActionData contains parameters that will be passed to your installer class. ProductName is the name of the property associated with the input control in the user interface dialog box, and so in your case you are asking the user for the product name inside the yor installer. Thus, the label is “Product Name” and the corresponding property should be set to ProductName (obviously, you can change this, but the most important thing to note is that the name of the user interface property must be the same as the name of the property in CustomActionData ), so this example worked.
Now in the installer class you can get the product name by doing
public override void Install(IDictionary stateSaver) {
note I included commented code //System.Diagnostics.Debugger.Break(); which you can comment so you can debug the installer class.
hope this helps.
Somedeveloper
source share