How to: Sign Setup Files with SignTool.exe (Windows Installer)
You can use SignTool.exe to sign a Windows Installer file (.msi) or a Setup program (setup.exe). By signing setup files, you help ensure that tampered files are not installed on end-user computers.
Note
The dialog boxes and menu commands you see might differ from those described in Help depending on your environment. To change your settings, click Import and Export Settings on the Tools menu. For more information, see Working with Settings.
To sign a Windows Installer file (.msi)
On the development computer, install the certificate that you want to sign the file with.
Open a Visual Studio command prompt.
Change to the directory that contains the .msi file.
Sign the .msi file by using the following command:
signtool sign /sha1 CertificateHash SetupFile.msi
For example, to sign a setup file that is named ExcelAddInSetup.msi, use the following command:
signtool sign /sha1 CCB... ExcelAddInSetup.msi
To sign a Setup program (.exe)
On the development computer, install the certificate that you want to sign the file with.
Open a Visual Studio command prompt.
Change to the directory that contains the .exe file.
Sign the .exe file by using the following command:
signtool sign /sha1 CertificateHash Setup.exe
For example, to sign the Setup program, use the following command:
signtool sign /sha1 CCB... Setup.exe