
Step 2: Right click on Setup project > View >Custom Actions> Click on Install node>Add Custom Action>Click on to Application Folder>Choose Primary output file.Node>Add Dialog>Select Text boxes>Change properties accordingly. It will show the installation process steps. Step 1: Right click on Setup project > View >User Interface.We can also adjust the display of our designed control with respect to We can make four text boxes which can be enabled and disabled with the property "Edit Visible". Text boxes, we will have inbuilt text boxes, we need to add those to our custom install wizard. We need to design our custom control according to our requirements. MessageBox.Show("removing existing Connection String " ) Ĭonnectionstring = new ConnectionStringSettings("SqlConnectionString ", dataSource) Ĭ(connectionstring) Ĭonfig.Save(ConfigurationSaveMode.Modified, true) ĬonfigurationManager.RefreshSection("connectionStrings " ) Adding custom control Designing the custom control " ConnectionString ĬonnectionStringSettings connectionstring = null Ĭ("SqlConnectionString " ) Getting the path location string configFile = string.Concat(Assembly.GetExecutingAssembly().Location, ". MessageBox.Show(Assembly.GetExecutingAssembly().Location + ". MessageBox.Show( " instance=" + dataSource) ĮxeConfigurationFileMap map = new ExeConfigurationFileMap() String initialcatalog = " Initial Catalog=" + Context.Parameters ĭataSource = dataSource + " " + initialcatalog ĭataSource = dataSource + " Integrated Security=SSPI " Step 4: Right click on Setup project >Add >Project Output > Select primary out put and Content files too.ĭLLs of the application right click> Properties> Set copy to local to True.Ĭopy Code // Installer.cs string dataSource = " Data Source =" + Context.Parameters.Web.config or App.config and the installer class (right click >project>Add new Item >Installer class) to existing project.ģ: Go to properties of the Setup project and change Author name,




Connection string details (instance name,ĭatabase name) will be taken from the user during the installation process.įor adding a custom control to the setup we need to design a page which facilitates taking all the inputs that are necessary to frame Along with setup creation we are adding a custom control toįacilitates framing the connection string during installation. In this article we are going to see how we can create a setup (MSI) file for a Windows application.
