c ++和WiX:静默接受.pfx证书 [英] c++ and WiX: Silent accept .pfx certificates

查看:464
本文介绍了c ++和WiX:静默接受.pfx证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这样的问题:我需要在我的安装(WiX 3.5)中导入.pfx证书。我需要接受导入他们没有任何(!)用户互动,甚至接受(需要这样做的建立服务器和测试makets的试用)

Such a problem: I need to import .pfx certificates in my installation (WiX 3.5). I need to accept importing them without any(!) user interaction, even acception (need to be so for testion on building servers and testing makets)

试用标准WiX解决方案,使用 WiXIISExtension ,但没有安静(静默)导入选项。

Tried standard WiX solution, using WiXIISExtension, but there is no option for quiet(silent) import.

来自dll的自定义动作):

Tried such solutions on C++ (deferred custom actions from dll in wix):


  1. PfxImportCertStore - CertEnumCertificatesStore - CertAddCertificateContextToStore
    证书管理器要求接受...

  1. Chain PfxImportCertStore - CertEnumCertificatesStore - CertAddCertificateContextToStore: Certificate manager asked for acception...

CryptUIWizImport code> CRYPTUI_WIZ_NO_UI :CryptoAPI试图访问私钥,经理要求接受...

CryptUIWizImport with flag CRYPTUI_WIZ_NO_UI: CryptoAPI tried to access to a private key, and manager asked for acception...

有没有办法解决这个问题?或者我真的需要写一个自定义服务来接受?这不是很酷...

Is there any way of solving this? or i really need to write a custom service for acception?! this is not so cool...

推荐答案

好吧,我解决了我的问题。在我的情况下,它只是用户保护证书的标志...只是我的假人...但是,在这两天我意识到:

Well, I solved my problem. In my case it was just the flag of user protected certificate... just my dummy... but, in these two days i realised:


    <请仔细考虑导入证书的方法... u应该知道不同的情况,当u需要使用从文件或从上下文导入...
  • Be carefully with the methods of importing sertificate... u should know different situations, when u need to use import from file or from context...

注意标志,u使用(如果u使用一些例子,则更多)

Pay attention to the flags, u used (the more if u use some examples)


Be sure ur certificate has approvals...

PS如果有人需要导入不同证书的工作代码的好例子,请注释我们

P.S. comment me if somebody needs good examples of working codes of importing different certificates

这篇关于c ++和WiX:静默接受.pfx证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆