成功完成 wix 引导程序输出的数字签名后 .exe 未安装
After successfully digital sign of wix bootstrapper output .exe is not installing
如果尝试在没有引导程序输出 .exe 文件的数字签名的情况下进行安装,它会在数字签名安装程序显示错误后工作 fine.But。
对 .exe 进行签名,在 bootstrap.wixproj 文件中的结束 /Project 标记之前使用了以下代码。
<!-- SignOutput must be present in some PropertyGroup to trigger signing. -->
<PropertyGroup>
<SignOutput>true</SignOutput>
</PropertyGroup>
<!-- Sign the bundle engine -->
<Target Name="SignBundleEngine">
<Exec Command=""C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe" sign /tr http://timestamp.digicert.com /td sha512 /fd sha512 /f "D:\Digital Sign Resorce\CARoot.pfx" /p Test123 /d "My Project Name" "D:\Project\xxx\v3.2.0.0\SetupWiX\bin\Release\SetupWiX.msi"" />
</Target>
<!-- Sign the final bundle -->
<Target Name="SignBundle">
<Exec Command=""C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe" sign /tr http://timestamp.digicert.com /td sha512 /fd sha512 /f "D:\Digital Sign Resorce\CARoot.pfx" /p Test123 /d "My Project Name" "D:\Project\xxx\v3.2.0.0\Bootstrapper_New\bin\Release\MyApp.exe"" />
</Target>
这对我有用。我将证书(并且只有一个证书)安装在我的构建用户服务帐户的个人存储中,以便自动选择它而无需密码或在其他地方访问 PFX 文件。我的 MSI 已在之前的构建步骤中签名。
<Target Name="SignBundleEngine">
<Exec Command="signtool.exe sign /tr http://timestamp.digicert.com "@(SignBundleEngine)"" />
<Exec Command="Signtool.exe sign /fd SHA256 /tr http://timestamp.digicert.com /td sha256 "@(SignBundleEngine)"" />
</Target>
<Target Name="SignBundle">
<Exec Command="signtool.exe sign /tr http://timestamp.digicert.com "@(SignBundle)"" />
<Exec Command="Signtool.exe sign /fd SHA256 /tr http://timestamp.digicert.com /td sha256 "@(SignBundle)"" />
</Target>
如果尝试在没有引导程序输出 .exe 文件的数字签名的情况下进行安装,它会在数字签名安装程序显示错误后工作 fine.But。
对 .exe 进行签名,在 bootstrap.wixproj 文件中的结束 /Project 标记之前使用了以下代码。
<!-- SignOutput must be present in some PropertyGroup to trigger signing. -->
<PropertyGroup>
<SignOutput>true</SignOutput>
</PropertyGroup>
<!-- Sign the bundle engine -->
<Target Name="SignBundleEngine">
<Exec Command=""C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe" sign /tr http://timestamp.digicert.com /td sha512 /fd sha512 /f "D:\Digital Sign Resorce\CARoot.pfx" /p Test123 /d "My Project Name" "D:\Project\xxx\v3.2.0.0\SetupWiX\bin\Release\SetupWiX.msi"" />
</Target>
<!-- Sign the final bundle -->
<Target Name="SignBundle">
<Exec Command=""C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe" sign /tr http://timestamp.digicert.com /td sha512 /fd sha512 /f "D:\Digital Sign Resorce\CARoot.pfx" /p Test123 /d "My Project Name" "D:\Project\xxx\v3.2.0.0\Bootstrapper_New\bin\Release\MyApp.exe"" />
</Target>
这对我有用。我将证书(并且只有一个证书)安装在我的构建用户服务帐户的个人存储中,以便自动选择它而无需密码或在其他地方访问 PFX 文件。我的 MSI 已在之前的构建步骤中签名。
<Target Name="SignBundleEngine">
<Exec Command="signtool.exe sign /tr http://timestamp.digicert.com "@(SignBundleEngine)"" />
<Exec Command="Signtool.exe sign /fd SHA256 /tr http://timestamp.digicert.com /td sha256 "@(SignBundleEngine)"" />
</Target>
<Target Name="SignBundle">
<Exec Command="signtool.exe sign /tr http://timestamp.digicert.com "@(SignBundle)"" />
<Exec Command="Signtool.exe sign /fd SHA256 /tr http://timestamp.digicert.com /td sha256 "@(SignBundle)"" />
</Target>