Prepared by: Vivi Compilation
It may be difficult for you to release your own applications and components, because you need to write complicated installation scripts according to the traditional method. The purpose of this article is to help. Net programmers get familiar with the use of very simple and convenient tools to release their own applications without writing installation scripts. Microsoft's. net installation and Release Platform simplifies all of this into several simple clicks. It provides a self-learning, simple-driven wizard. Many programmers who use Visual Studio. NET do not take full advantage of vs's Windows Installer tool and choose other tools. In fact, it is very simple to use.
Features of Windows Installer
· Compared with traditional script-based Installation Tools, it provides all the installation data and commands in a single package based on a data-driven model.
· It supports the self-repair function-the program can be automatically reinstalled
· It provides the function to roll back to a certain step during installation
Create a release project
Visual Studio. NET provides four types of release project templates:
· Installation Project: Create an installation package for Windows-based applications
· Merge Module Project (. MSM): Package components that can be shared by multiple programs
· Web installation project: Create an installation package for a Web application
· Cab Project (. Cab): Create a cab file
At the same time, the installation wizard provides help steps along with the creation and release of the project:
· For an installation project, release the files to be installed to a program directory on the target computer.
· For a Web installation project, publish the files to be installed to a virtual directory of the Web Server
Note: If you have created a standard release project and intend to release it to the Web, you must create a new project.
Five-step program installation package
Step 1: Open vs IDE and select File> New> setup and deployment projects. Select setup wizard. The file name and directory of the storage project are provided. 1.
Step 2: The welcome page of the Installation Project Wizard dialog box is displayed. This is a simple four-step wizard. Click Next. In the second step, you will be asked about the installation type. Please select an appropriate answer. Here I select windows application installation and click Next.
Figure 2 install a Windows Application |
Step 3: The Wizard will allow you to add programs or components for development and other required files, such as document files.
Figure 3 add a developed program or component Figure 4 Add a developed program or component |
Finally, you will see the content shown in Figure 5:
Figure 5 The application folder is the installation folder of your program and support files |
Here, the application folder is the installation folder of your program and the support file, and the user's desktop and program menu are the desktop and program menu of the target system respectively.
Step 4:
You can choose to use the following editor during the production process:
File System Editor: You can add project outputs, files, and other items to the release project and specify their installation locations on the target computer.
Registry Settings management Editor: You can specify some key values in the registry to be added to the target computer.
File type management Editor: Creates file associations on the target computer.
Custom processing management Editor: You can specify some processing (such as restarting) executed after installation.
Start Condition Management Editor: You can specify conditions that must be met for a successful installation.
User Interface Management Editor: You can use it to set some predefined dialogs displayed during the installation process. Figure 7 shows an example of adding a User License Agreement and serial number dialog box.
Figure 6 set some predefined dialog boxes displayed during installation
Figure 7 set some predefined dialog boxes displayed during installation |
Conclusion
If you are still using traditional installation scripts, try using Windows installer. If you have purchased a genuine Visual Studio. NET, it comes with a Windows installer. It's time for you to get familiar with and use it.