Delete certmgr certificate from the command prompt

0

I need to exclude certain certificates from my computer so they do not disturb my vba automation system, but I did not find anything that could give me a glimpse of how to do this by programming or by cmd line. I am currently using VBA to perform the automation of some process, does anyone know any way to do this, to create a process, maybe, that can erase these certificates. Today I can delete the certificates using Certmgr, entering Personal and then Certificates, then I delete them and the system runs perfectly, but I wanted to make it automatic.

    
asked by anonymous 02.02.2018 / 19:28

1 answer

1

After a while searching for the solution, I found this command:

Important note: Certificates placed in Windows are located in the following folder: C: \ Users \ User \ AppData \ Roaming \ Microsoft \ SystemCertificates \ My \

To exclude it follows the following code:

Shell ("cmd.exe /c cd C:\Users\Usuario\AppData\Roaming\Microsoft\SystemCertificates\My\Certificates & del /a:s 'nomeCertificado'")

With this you can delete the certificates before inserting the Token, for example, and when you insert it, Windows will automatically install the Token.

    
08.08.2018 / 16:54