creating .msi question.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would like to create .msi file that asks for product key/activation key/
licensing
key for my class library.

My plan is to provide a licensing key during the installation of my class
library and
validate its usage at run-time.

Can you suggest me, how I can do this with Visual Studio.NET 2003.

Cheers,

Naveen.
 
Sure, VS comes complete with the tools to do this. Its not very intuitive,
but you can prompt the user for the key during installation.

Here is some sample code that I wrote to change the .config file during
setup with the values chosen, but you could modify the code to do whatever,
the important thing is that you override the install method in the
Installer...


// I added this to modify the app.config file upon installation
public override void Install(IDictionary stateSaver) {
base.Install (stateSaver);

string smtpServer = this.Context.Parameters["SMTPADDRESS"].ToString();
string email = this.Context.Parameters["SENDTO"].ToString();
string min = this.Context.Parameters["ANOTHERVALUE"].ToString();

}

The values are obtained from the form that you add to the setup project (the
one that has 3 textboxes, 2, etc... just name the property value of the
textbox with the name above... ie: SMTPADDRESS

So to explain further, for your setup project, add a dialog, select the
dialog you want (ie: Textboxes(A)), then give the boxes labels, etc and set
the property value
 
Back
Top