How to create a C # installation program

Source: Internet
Author: User

A C # installation needs to be made in the near future. Find some information on the Internet is not very complete, and finally the synthesis of some of the information, and through personal detection, and finally finished C # packaged into the installation program (packaged into the simplest kind of installation program. Assume that you need a higher capability to develop yourself).

Detailed steps are organized such as the following:

The packaging process is completed in vs2008 , but also applies to vs2005. The program is written in C # .

1. New Installation and deployment.

Open the project that you wrote . On the workaround, right- Click Join -New project.

Select the Setup project , installation and Deployment , other project types.

In the name, change the name to the name you want, and then make sure.


2. Make sure to open the file system and click on the application directory, and in the right margin , add the project output.



3. Select the primary output. And then determine.

At this point the application directory in the file system



4. Right-click on the primary output you just added and create its shortcut. can be renamed or not renamed. This is named Picsee.



5. Cut the shortcut you just created. Then click on the user's Program menu, right-clicking on it, adding, directory. Renames the directory.

The name of this directory is the name that you display in all programs at the beginning. Then click the directory you just created. Paste the shortcut in the right margin, and when the program is installed, the shortcut will appear in all of the programs that are now in place.



6. Create a shortcut like the one above. Shear. Then click User Desktop, Paste. After installing the program, this shortcut is now on the desktop.



7. right Click on the left " Application Folder " Open Properties dialog box in the path of " [Manufacturer] " remove otherwise the installer default installation folder will be " C:\programm file\ your username \ Install solution name " .

8. Right-click on the name of your installation project. Property.


select " prerequisite ", In the prerequisites page that opens Select for example in the selection Include the .netframework component in the generated installation package, and then determine it.


9. Change the default icon for the program in the desktop and in the Start program. In the right margin of the application directory, Add File , right-click. Add an ico file.



Open the user's Program menu ->picsee, Right-click on the shortcut on the right. The Properties form. Add the ico icon that you just added to the icon property in its properties.

In the same vein, open the user desktop. On the right side of the shortcut, right-click the Properties form. Add the ico icon that you just added to the icon property in its properties.

10. plus into the uninstall function.

In the right margin of the application directory, Add File , right-click. Select the msiexec.exe file under the c:\windows\system32 directory. Then rename it to Uninstall.exe. You can change the name without changing it.

then create a shortcut. Cut to the user's program menu ->picsee .

One by one . Click the name of the installation project ( Picsee) with the left mouse button to view its properties. Note not right-click . Property. View its ProductCode property.

Then copy the value of the property.


.then open the Properties dialog box for the uninstall shortcut you created , and in the aguements property, enter " / x {ProductCode} ",This example is/ x {d8db4dcf-b28a-49cb-9840-e36d68fd7ee1}.



in the right-click Setup Project (picsee) name, you can build a setup program with the uninstall feature by clicking Build .

At this point a simple installation program is ready, thanks to all the friends of the help, thank you for your information.

How to make a C # installer

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.