C # package and deploy the winform Program
1. Create a C # installation and deployment project
2. In the file system Editor, add the executable files of the prepared project and other files (related DLL and resource files) to the application folder)
3. To add shortcuts to the program menu, you can generate a shortcut for the project executable file in the application folder, cut it to the user's program menu bar and change the name to the name you want.
4. If you want to add the uninstall function vs 2003, add the c: \ windows \ system32 \ msiexec.exe file to the application folder and create a shortcut, cut to the user's Program Folder. In the attribute window, enter/X {productcode} in the arguments field. This productcode is empty and the property value of productcode in the property of the installation project is copied, for example,/X {16c2b03c-f8c9-4be9-9bd6-d4e6319fda66}
5. You can also specify your own icons for shortcuts.
How to package winform programs
Time: Source: Author: Click between squares: 4 times
How to package posted on jingjing1009 for the winform program read (14) Comment (1) edit the category of favorites: winform needs to be packed for an application today, because there are many steps, with my personal forgetting, I went to the Internet to search for a detailed packaging procedure. To prevent further forgetting,
How to package winform programs
Posted on jingjing1009 reading (14) Comments (1) edit the category of the favorites: winform needs to be packaged for an application today, because there are many steps, with my personal forgetting, I went to the Internet to search for a detailed packaging step. To prevent further forgetting, I pasted it here. Let's talk less about it ,:
1:Create an installation and deployment project
Open vs, click "Create Project", select "other project type"> "installation and deployment"> "Installation Wizard" (the same is true for the installation project), and click "OK" (for details, see)
The image of this topic is as follows:
2:Installation Wizard
Open the Installation Wizard, click Next, or click Finish.
3:Start production
After the installation wizard is complete, you can enter the project folder:
Double-click"Application folder"Right-click the blank area on the right and choose add> file to add the executable files and corresponding class libraries and components of your application.
Right-click your executable file, create a shortcut, and cut or copy the shortcut to "user's 'project' menu" and "User desktop" on the left.
After the installation and installation of the installer are complete, the program shortcut will be generated on "start-> All Programs" and "desktop.
Right-click "application folder" on the left to open the Properties dialog box:
Set"Defaultlocation"Remove" [manufacturer] "from the path,
Otherwise, the default installation directory of the installation program will be "C: \ programm file \ your USERNAME \ installation solution name ";
Open solution manager, right-click your solution name, and select properties:
On the open properties page, select"Required",
On the System essentials page, select the following items. This is very important !!!!! 1 !!!!!
After the installation is selected, the generated installation package contains the. netframework component. (this option is not selected by default)
Now, 99% is complete, and then click "generate-> Generate solution". Ha, generation successful!
4:Production completed
Now open the debug folder in the solution folder and you will see the generated Installation File.
[Continued] about adding the "Uninstall" Function
The above article only introduces a simple method for generating and installing,
However, vs. net2005 does not directly generate the uninstall program function,
So we have to use MSI to implement it,
I will not talk about the principle. I will search for a bunch of images online. I will only talk about operations,
[1]: when setting the purpose of your application, add an msiexec.exe multiple times,
This file is in the c: \ windows \ system32 folder,
After the program is added, change its name to "uninstall.exe" to make it more like an uninstallation program ",
Of course, this does not matter much. It can be changed without modification.
Then create a shortcut for him and put it on the desktop or "start-program,
I chose to put it in the Start menu, and what we want to do below is to find the productcode of the deployment project,
Click the project name with the left mouse button, remember to click the project name with the left mouse button, and then click the attribute tag. Note: it is not a right-click attribute,
This is very different. Now you can see the productcode,
Then open the shortcut Property dialog box that you created,
Enter "/X {productcode}" in the aguements attribute }",
Click "generate solution" to generate the installer with the uninstall function.