Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

Installing CERTIFICATES using Wise Package Studio

Updated: 15 Nov 2010 | 3 comments
CableGuy41's picture
+18 18 Votes
Login to vote

I recently packaged an application for Windows Vista as well as Windows 7, in which there are several CERTIFICATE files [.cer] that I need to install as part of my application install. If you have the same scenario then this article will simply help you to do the task.

Certificate files are installed through command line with the help of Operating System inbuilt tool called "CERTUTIL.EXE" which exists under c:\windows\system32 folder in Windows Vista and Windows 7.   

Installed certificates can be viewed from Microsoft Management Console [MMC]. Follow the instructions to see the installed certificates on the machine

Click Start -> Run -> Type mmc and press enter.  Following window pops up

 

Click File -> Select "Add/Remove Snap-in..."

Select "Certificates" from snap-ins and click "Add" button and click OK, as shown below:

 

Select "Computer Account" and click NEXT button:

Click "Local Computer..." and click on "Finish"

Click "OK" button:

 

Now you see all the installed certificates on the machine under Console Root -> Certificates -> Trusted Root Certification Authorities -> Certificates: 

  

 

Install Certificate:

Certutil.exe –f  –enterprise  –addstore  root   <CERTFILEPath>

For installation write a CUSTOM ACTION [in MSI or MST] where 

Working Directory : SystemFolder

File Name & Commandline : Certutil.exe –f  –enterprise  –addstore  root   <CERTFILEPath>

Put it in INSTALL EXEC SEQUENCE after InstallFinalize and condition should be REMOVE<>"ALL" so that the custom action should also run during REPAIR. 

After installation verify the certificate installation through MMC. 

Note: Copy .CER file to INSTALLDIR which will be <CERTFILEPath>Uninstall Certificate:

 

Use "Subject Key Identifier" to uninstall a particular certificate from the machine. 

  

Certutil.exe - delstore –enterprise  root   <Subject Key Identifier >

 

Check the Certificates Properties to get the "Subject Key Identifier".

 

 For installation write a CUSTOM ACTION [in MSI or MST] where 

Working Directory : SystemFolder

File Name & Commandline : Certutil.exe - delstore –enterprise  root   <Subject Key Identifier >

Put it in INSTALL EXEC SEQUENCE after InstallInitialize and condition should be REMOVE="ALL" so that the custom action should only run during UNINSTALLATION. 

After uninstallation verify the certificate uninstallation through MMC. 

Note: <Subject Key Identifier > should be without spaces
 
 
 
I hope this information helps!

Comments

scriptinguy11's picture
16
Nov
2010
2 Votes +2
Login to vote

wondraful article

good job!

Sushma's picture
29
Nov
2010
1 Vote +1
Login to vote

very good

thank you

B_Raj's picture
30
Nov
2010
2 Votes +2
Login to vote

good work mate

good work mate