Delete Certmgr certificate by command prompt

Asked

Viewed 1,352 times

1

I need to delete certain certificates from the computer so that they do not disturb my a vba automation system, however I have not found anything that can give me a light how to do it by programming or per line of cmd. I am currently using VBA to perform the automation of some process, someone knows some way to do this, to create a process, maybe, that can delete these certificates. Today I can delete the certificates using Certmgr, entering in Personal and then in Certificates, then I delete them and the system runs perfectly, but I wanted it to be automatic.

1 answer

1


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

Important detail: the certificates placed in Windows are in the following folder: C: Users User Appdata Roaming Microsoft Systemcertificates My Certificates

To delete follows the following code:

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

With this from to delete the certificates before entering the Token, for example, and when inserting it Windows will automatically install the Token.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.