Detailed description of winform package and release installation package

Source: Internet
Author: User

Use the package tool provided by VS to create a winform installation project

Development Environment: VS 2008 Access

Operating System: Windows XP

Development language: C #

Project name: ** Management System

 

Steps:

Step 1: Open the development environment VS2008, create a project, select another project type, select "Installation Project", enter the name and select the installation path;

 

Step 2: Go to the file system tab, select the application folder, right-click the blank area in the middle and select "add file" to add the project file (exe, dll );

 

Step 3: add the files required for the project. Here there are two folders (DataBase and Report), because DataBase is used to store the project DataBase, and Report is used to store the Report files required by the project. rpt. Therefore, you must create a folder with the same name in the application folder and add the required files. Effect:

 

Step 4: Create a shortcut for the project to view the installer in the Start Program menu and in the desktop application. Right-click the executable file (personfinance.exe), create a shortcut, rename "** company ** Management System", and drag and drop the shortcut to the user's "program" menu. Repeat this step to add the new shortcut to the "user desktop" folder.

It is best to create a folder in the user menu to store the installer

 

Step 5: Set system prerequisites, right-click the installation project, go to the properties page, and click "system prerequisites" to go to the system prerequisites dialog box; select "create installer for installing required system components", and in the list of required system components to be installed, select

1) Windows Installer 3.1 (required)

2). NET Framework 3.5 (optional) refer to the final description

3) in the Crystal Report Basic for Visual Studio2008 (x86, x64) (optional) project, you must select this option when using the Crystal Report.

Important: Check "Download essential system components (D) from the same location as my application", which means that when you select this option to generate the installation project, under the path of your installation project, you will find the components you have selected in the list of required components. (The system automatically completes. This is not bad because you do not need to download the components yourself)

 

Now, the installation package is almost complete.

 

Step 6: uninstall the program, because after the installation package is completed, you cannot only install the program, but also uninstall the program.

First, under "C: WINDOWSsystem32", find msiexec.exe to add it to the application folder, create a shortcut, and name it "Uninstall management system" or "Uninstall"

Next, select the ProductCode of the installation project.

Right-click the shortcut to uninstall the program and choose properties. In the Arguments option, enter/x and ProductCode. For example,/x {6931BD71-5C5E-4DA1-A861-14C7D1A78B97}

Store the uninstallation program to the user's Start Menu folder (New in step 4)

Step 7: change the properties of the installer, right-click the properties of the installation project, and you can set the author and name of the project. Other properties can be set according to the actual situation.

 

Step 8: generate an installation project

When the command is generated, some warning will appear: You should exclude "cmdmsiexec.exe" because the source file "C: WINDOWSsystem32msiexec.exe" is protected by "Windows system files ".

Two or more objects have the same target location ("[targetdir] model. dll ")
Solution:

First: Do not process

Second: the first type of warning. You can compile the uninstall program.

Second warning: Delete the same file

 

The installation project has been created.

 

 

Installation and running:

Run steup. msi directly or setup.exe.

 

There will also be corresponding installation programs and uninstallation programs on the desktop and the Start Menu.

 

 

Description and summary:

1 ,. net framework is optional. It is not necessarily required for VS2008 development. net framework 3.5, as long as you do not use it in the program. net framework 3.5 features such as (LINQ), you can select 2.0 when you select the framework. Why? Because 2.0 only has more than 20 MB, and 3.5 has more than 200 MB.

Change Method: There is a detected dependency file under the installation project, double-click Microsoft. net framework, enter the startup Condition Selection card, right-click to select. net frmaework select the one you need in Version. net framework

 

2. You can set the name as needed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.