Search code examples
c#visual-studio-2005setup-projectsetup-deploymentsetuptools

Getting the error 2869 while adding custom actions to a C# setup project


I have created a C# setup project to deploy a C# windows application. I want to add custom prompt screens to my installation. So I have added a new "Installer" Class to my windows application and then overidden the "Install" method in it.

On right clicking SetUp project, in the "Custom Actions" window I added "primary output of the windows application", (where I have overridden "Install" method).

Later I set the "CustomActionData" property like this:

/txtBox1=[EDITA1]

And the argument property to EDITA1, where EDITA1 is the identifier value for the text box that I have added to my custom prompt screen.

Inside the overridden Install method I am accessing this textBox value like this:

 Context.Parameter["txtBox"] 

But when I try to install this package I am getting a pop up screen throwing error code 2869

The error popup messgae reads:

The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869.

Kindly let me know how shall I pass values from custom screen to the overridden install method.

THANKS IN ADVANCE


Solution

  • The format should be

    /name="value" /name2="value". To pass installer properties the format is /name="[SourceDir]"

    This link has more details