Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How Do You Delete a Certificate Using CertMgr.exe CertMgr ?

$
0
0
I'm developing a Full Trust WPF Web App to be distributed on a corporate network.
I have created certificates, and signed the app.
I need the certificates to be automatically installed (I've created bootstaps for other pre-requisites - and I am aware of the security implications).

I've created a windows setup project (in VS 2008) which has custom actions to install the certificate to the Trusted Publishers and Trusted Root Certification Authorities.

certmgr -add "[TARGETDIR]My.cer" -s -r localMachine Root
certmgr -add "[TARGETDIR]My.cer" -s -r localMachine TrustedPublisher

This works and the certificate appears in the certificate manager as expected.

- Now the bit that isn't working:

I've added these commands to the Uninstall in Custom Actions.

certmgr -del "My.cer" -c -s -r localMachine TrustedPublisher
certmgr -del "My.cer" -c -s -r localMachine Root

From the command line these commands return success but the certificate does NOT get removed/deleted.
This is obviously the same for the installer.

HOW DO YOU DELETE A CERTIFICATE?

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>