Winform custom Packaging

Source: Internet
Author: User
Tags decompress file

We are packing winform these two days. I encountered some problems. I went online for two days. I 'd like to sum up and share it with you.

I. Relatively basic packaging. These operations have long been available on the Internet.ArticleFor more information, see. Let's take a look at the address.

Http://www.cnblogs.com/bobby7514650/archive/2009/12/21/1629235.html

II. Winform encapsulates these basic packaging functions, but has no personality. If you want to make your packaging project a little more personalized, you can perform the following operations. 1. Right-click the package project and choose View> User Interface.ProgramAdd other dialog boxes. Right-click Start --> Add dialog box. You can add your own dialog box. Each dialog box has many attributes. You can click it on your own and try it. I am not so arrogant about it. In addition, you can adjust the display sequence between all the dialogs.

 

3. You can add custom operations. Right-click the package project and select View> Custom operation. A custom operation is similar to an event in C #, that is, there are four types of custom operations, which may happen in each case. A custom operation occurs after a certain situation (Remember, it is later) called. The. dll or. EXE file is called.

 

Next I will talk about several common situations.

 

First, sometimes. NET Framework is not installed on the client's computer, so we want the user to directly provide the ready-made. net installation package instead of downloading. net. In this case, you can right-click the package file, select properties, and click system essentials. In the system essentials dialog box, there are three single-choice buttons. Let's select the one in the middle, the generated package file will contain.. NET Framework.

 

If you want to add. NET 2.0, it will prompt that the required items cannot be loaded, because vs2010 will go to C: find a folder named dotnetfx in the \ Program Files \ microsoft sdks \ windows \ v7.0a \ bootstrapper \ packages directory. Of course, this folder does not exist by default. If vs2008 is installed on your computer, you can go to the C: \ Program Files \ microsoft sdks \ windows \ v6.0a \ bootstrapper \ packages folder, copy the dotnetfx folder and all its contents to the C: \ Program Files \ microsoft sdks \ windows \ v7.0a \ bootstrapper \ packages folder. The problem is solved.

 

If You Want To Compress Your package file together with the necessary system files. if you use an EXE file (this is more convenient), you can perform the following operations. Select all the files in your releasefolder, including setup.exe and setup. MSI file, as well as the generated system essential file, right-click and choose add to compressed file. On the General tab, select "create compressed file in self-decompressed format" in the compression option ", enter the name you want in the text box below the compressed file name. Select the "advanced" tab and click the "self-extracting options" button. The "Advanced Self-extracting options" dialog box is displayed. In the text box below the general path, enter C: \ Program Files \ your software name or company name. After the program is decompressed, run the following example box to enter the name of your local file. The general situation is setup.exe. Click the "text and icon" tab, this small page will let you fill in the title of the Self-extracting window (that is, the title of the window when you run this self-extracting file ), text displayed in the Self-extracting window (that is, running the self-extracting file is, some text on the page, you can write some software requirements for the client, etc ), self-decompress the logo (that is, the image on the left side of the window when you run the self-decompress file), and the self-decompress file icon (this is. ICO logo, which determines the icon of the Self-extracting file you generated and the icon of the window when running the self-extracting file ). It must be noted that the text displayed in the Self-extracting window supports HTML and CSS markup.

 

If you want to replace the new software version with the old version during installation, perform the following operations. In vs, left-click to package the project and check the Properties window. The last attribute is the version attribute. You need to change the version attribute to a higher level and then generate the productcode, set the removepreviousversions attribute to true. (If you have uninstalled the function, because the producecode has been changed, you also need to adjust the arguments attribute of the unload shortcut .)

 

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.