Archive

Posts Tagged ‘context’

Passing parameters collected in dialog to Custom Action in msi C#

May 14th, 2011 Comments off

I was a little lost to why the dialog boxes I was adding to my windows installer msi was not being passed to my custom action.

There is a very simple item that I overlooked, and that is you must specify what values you want sent to your custom action.

On the properties of the custom action, there is a property called CustomActionData.

The format of this properties is:

/ParamName1=”[DIALOGPROPERTY1]” /ParamName2=”[DIALOGPROPERTY2]” …. etc

Custom Action Properties

Custom Action Properties

Then to use the parameters you will use the following code:

string sqlServer = Context.Parameters["ParamName1"];
string username = Context.Parameters["ParamName2"];
string password = Context.Parameters["ParamName3"];
%d bloggers like this: