How to programmatically install a certificate using C#
问题 my school webpages have selftrusted certificate(you must install it manually) and I wanted create program that will install a certificate.cer (from visual studio resources) to Local user -"Trusted root certificate authority" after i click on a button.Do you know how to code it in Visual C#? 回答1: To add the certificate to the trusted root store for the current user programmatically, use the X509Store and X509Certificate2 classes. For example: string file; // Contains name of certificate file