
Select one of the pre-built dialogs (for example Textboxes (A)).Depending on where you want the dialog Right-click a node and select Add Dialog.The first step is to create the user interface – Right-click the setup project and select User Interface.For example, perhaps we are installing a service that needs to run as a particular user, we might want to configure this as part of the installation process. Where this becomes a little tricky is where you want to prompt the user for some information during installation and then use this information as part of the custom action. These are the basic steps for getting your Custom Actions to execute as part of the installation process. From within the Application Folder select the Primary Output from your application (if it is not in this folder, or your installer is in a different class library you might need to add that using the Add File, Add Output or Add Assembly buttons).Right-click the action (ie Install, Commit, Rollback or Uninstall) that you want to wire up (should correspond to the event you wrote the event handler for earlier) and select Add Custom Action (if you right-click the Custom Actions node it will wire up events for all four actions).Right-click the setup project and select Custom Actions from the View menu.Add your logic into the event handler that is created (this is your custom action).From the Properties grid select the Event view, followed by the event that you want to wire up (eg AfterInstall) – Double-clicking the drop-down box will create an empty event handler!.If the Installer item is not currently open, double-click it in the Solution Explorer to open the designer.Add an Installer item to your application (from the New Item dialog select the Installer template).The process goes a bit like this (assumes that you have already created your setup project and have added the primary output of your application):
#Advanced installer command line parameters code
Each action can be written in managed code in a similar way to a typical event handler. These can be hooked up to the installer to execute at various points such as Before/After Install, Before/After Rollback and Before/After Uninstall. One of the common tasks when building an installer for an desktop application is to add your own Custom Actions.

This post is more of a permanent pointer so that I don’t have to trawl the web every time I want to find this information.
