A signature
The so-called signature is to give the application an identity, to apply for a patent. You need to select a certificate when signing. As soon as we went to school, the teacher sent you a certificate. If you do not sign, the anti-virus software will be your packaged EXE file as a virus processing.
Signature steps: (1) Right-click on the properties of the item you want to publish. pops up as shown in the window.
Two certificates
The certificate is mentioned in the signed section, we must create it ourselves when we create the certificate. Because the default expiration time for a certificate created on VS is only one year, it means that every year you have to create another certificate for the application you installed. We use the Microsoft-brought vs console command tool to create our own custom certificate, and we can set the expiration date. The steps are as follows:
To open the SDK command prompt for the Microsoft. NET Framework, follow these steps:
1. Create a self-signed x + + certificate (. cer) and a. pvk private key file, using the MakeCert tool, with the following command:
2, Makecert-r-n "cn=sqs3ng"-B 01/01/2011-e 01/01/2020-sv myselfname.pvk myselfname.cer
Follow the prompts to set the private key password (or do not use a password) to generate related files in the current directory
2. Create a Publisher certificate (. cer) using the CERT2SPC tool, with the following command:
CERT2SPC Myselfname.cer MYSELFNAME.SPC
3. Convert from. pvk and. spc format to. pfx format, using the Pvkimprt tool, the command is as follows:
PVKIMPRT-PFX MYSELFNAME.SPC myselfname.pvk
Note that you need to download and install Pvkimprt.exe here, otherwise you will be prompted that "pvkimprt" is not an internal or external command, or a program or batch file that can be run.
PVKIMPRT tools as below, after downloading the first decompression.
Http://download.microsoft.com/download/vba50/Utility/1.0/NT5/EN-US/pvkimprt.exe
Follow the prompts to export the. PFX certificate, if you set the private key password in step 1th, you need to enter authentication here
The certificate Export tool is used to export. SPC and. pvk files as PFX certificate files.
When you export, you are prompted to create a password for the certificate
After entering the correct password, the Export Wizard interface appears, click Next, select "Yes, Export key", then click Next,
The Certificate Type selection screen appears, select "Personal Information Exchange-PKCS #12 (. PFX) (P) "(only this option is optional and none of the options below it), then click Next,
With the private key protection password option, enter the password, then click Next, enter the name of the file you want to generate in the text box (typically consistent with the certificate name), and click Next
Displays the completion window and displays information about the exported certificate.
Three releases
(1) Web browser publishing application
First of all, I'll show you a quick way to do this without adding a deployed project to vs. The so-called Web browser publishes the application. Or the same as above. Right-click the property on the item you want to publish, select the Publish property
Is the effect of the application re-browser:
(2) Add installation, deployment project
Right-click the entire solution to add the installation project. Such as
Then you start adding the main output file, which is the so-called packaged item. Such as
Follow the steps above to enter the Add Project Output Group window, as
Next I'll show you how to add an uninstaller
Add an output file as shown on the top image. Locate the C:\WINDOWS\system32 directory and select the Msiexec.exe file. After adding Msiexec.ex to the folder, add a shortcut to it and rename it to Delete.exe. After modifying the Delete.exe property arguments to \x{6dcf3e96-7334-479d-b0b7-a36439e050c5}, the number in the curly braces is the ProductCode property of the Setup project ( Find this property must be left-click to select the Setup project, not right-clicking on the Lookup property.
The Setup project is then built. After the build is successful, it can be used for installation. The specific views are as follows:
The following is a view of installation and uninstallation.
< have a reference to the place. If you are offended, please forgive!>
WinForm program installation and release process