Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

How to install a certificate (.pfx) file using a custom action while building a package

Created: 05 May 2009 | 2 comments
WiseUser's picture
+1 1 Vote
Login to vote

1. Download WinhttpCertcfg.exe from http://msdn.microsoft.com/en-us/library/aa384088.aspx
2. Copy the cert.pfx file to install directory say c:\program files\<Installdir>
3. Write a custom action that takes winhttpcertcfg.exe as the binary with the following cmd lines
4. -g -i "c:\program files\<installdir>\cert.pfx" -c LOCAL_MACHINE\My -a "Network Service" -p Me1
5. Certificate installed

Comments

philbenson's picture
12
May
2009
1 Vote +1
Login to vote

Another method

would be to "capture" the registry information that the import produces. The only thing you have to watch out for is the location to where the certificate is imported to, USER or MACHINE. TO import start up the msc console and add the required plug-in.

Just my tuppence
Phil

erikw's picture
22
May
2009
0 Votes 0
Login to vote

Why the hard way?

When you package for Windows you can add a custom action like:

Importpfx.exe -f 3-1-2008_07700004.Pfx -p password -t USER -s MY
The biggest enhancement is that this also covers P12 certificates.
 

Regards Erik www.DinamiQs.com Dinamiqs is the home of VirtualStorm (www.virtualstorm.org)

*************************************************************
If your issue has been solved, Please mark it as solved
***********