Problem in Customizing .NET Set-Up



Hi,

I want to do some custom work on the Windows Set-up for my
application. The things include making some connection
string changes in config file, creating a dsn etc based
upon user input from the Set-up wizard User Interface.

For this purpose i have created a Textbox user interface
having 4 textboxes which takes in user name, password,
database name, server etc. So far so good.

Now to access these User Inputs i've wriiten a class
(customary Installer class), from where the usual process
of creating and validating connection string and making of
DSN would take place.

HOWEVER, i am unable to retrieve these user inputs. Below
is the code from Installer.CS

public override void Install (
System.Collections.IDictionary stateSaver )

{


try{

if(this.Context!=null)

{



StringDictionary parameters = Context.Parameters;

string[] keys =new string[parameters.Count];

parameters.Keys.CopyTo(keys,0);


#region "Region 1: Set the StateServer collection values"

for(int intKeys=0;intKeys<keys.Length;intKeys++)

{


if(keys[intKeys].Equals("DATABASE"))

{

stateSaver.Add("database",parameters[keys[intKeys]].ToString());


}

else if(keys[intKeys].Equals("SERVER") )

{

stateSaver.Add("server",parameters[keys[intKeys]].ToString());

}

else if(keys[intKeys].Equals("USERNAME"))

{

stateSaver.Add("username",parameters[keys[intKeys]].ToString());


}

else if(keys[intKeys].Equals("PASSWORD"))

{

stateSaver.Add("password",parameters[keys[intKeys]].ToString());


}



parameters collection has 4 values and the keys include

assemblypath, logfile, Installtype, action

Any suggestions there.


.



Relevant Pages