Installing CERTIFICATES using Wise Package Studio
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.
Comments
wondraful article
good job!
very good
thank you
good work mate
good work mate
Regards,
Balsaraj
http://balzqazone.wordpress.com
Would you like to reply?
Login or Register to post your comment.