Preface: Big New Year's, write article is not easy, or give yourself a praise ~ ~ years ago looked for the next. NET installation package, found that Visual Studio comes with a production tool that is cumbersome to use, need to download the installation package separately, and what activation authentication and so on fart things quite troublesome, The most pit father is its custom dialog use has a lot of limitations, so looked for a long time, finally found the advanced Installer. Groping for two days, is a master of some basic methods, here to make a record. Believe that the need to use the park friends is absolutely dry, do not believe you can see.
Original address of this article: http://www.cnblogs.com/landeanfen/p/6359156.html
First, basic usage
About the basic usage of advanced installer, online really can search too much, bloggers do not do too much description, because to use the process of custom installation package, need to create a new dialog, Bo Master with cracked version of the Enterprise Template, advanced The version of installer is 13.5.
First create a new template inside select Enterprise.
Several key points that need to be set are as follows:
Add files and folders for the installation package
If it is a Web installation package, you need to set up the information about IIS, this online very much information, do not do too much explanation.
Custom dialog, note that this feature must be in the Enterprise Edition template.
Second, set the site name, IP, port number of the IIS Web site
If only these things, this article is not much value. The above is only the cushion, the following is the focus of this article to say.
You can customize the dialog to dynamically configure the IIS Web site name, binding IP, and port.
1, New dialog, drag out the installation Process dialog appearance, I believe WinForm experience of us, this is simple. For example, the following effect:
Remember the property names of each text box, such as the name of the text box for the Web site named edit_2_prop_1.
Let's remember this property name and come to the IIS tab, so we configure:
Originally, in advanced installer, using brackets [] to enclose the property name of the control to represent the concept of a variable, this should not be difficult for our programmers to understand. Well, that's not a good idea. Then, we use the same method to set the binding IP and port number of the IIS Web site.
Once this is set up, we can dynamically configure the IIS Web site name, IP, and port during the installation process. It is so simple, is not very magical ~ ~
Iii. dynamic configuration of Web. config
During the installation process, we often configure the Web. config configuration file, which allows you to configure the XML file conveniently in the Advanced installer. Come and see it.
First look at the contents of Web. config.
When adding a file, if we add a file type of xml,advanced installer will prompt you to turn it into configurable XML. For example, we right-click on the Web. config file and select Properties.
Let's see where [Edit_1_prop] came from.
With the foundation above, this should not be difficult to understand. Yes, it is in the form of this variable to dynamically configure. Here is just a simple configuration of appsetting as an example, probably the most used in the actual environment is dynamic to configure the ConnectionString, if interested can try, and the above steps are basically similar. Of course, it was a little cumbersome to see in the garden An example of configuring Web. config through a custom DLL. It's still that simple.
After doing these preparations, our installation package is basically done. After the compilation run, after a step by step fool-type installation, you can dynamically configure these things, do not believe you try ~ ~
Iv. Summary
The above is configured with a simple example of IIS and Web. config, there is time to further describe the way to manipulate the interface through the DLL.
If you feel that this article can help you, you can play on the right side of the blogger, you can also recommend spiritual encouragement. Your support is the tireless power that bloggers continue to uphold.
Original source of this article: http://www.cnblogs.com/landeanfen/
Welcome to reprint, but without the author's consent, reprint article must be in the article page obvious location to the author and the original link , otherwise reserve the right to pursue legal responsibility
C # Advanced Series--using advanced installer to make an IIS installation package (one: Configuring IIS and Web. config)