Click here to Skip to main content
13,046,375 members (69,347 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I want to sign my exe and msi files. I have my certificate installed in "Trusted Root Certification Authorities", but I couldn't find a way to access that store so I imported my certificate CA (.cer) to "MyCertStore" store. I tried to sign my exe file using the following command :

signtool sign /v /s MyCertStore /n "My comany Title" /t http://times <fullpath>\bin\Debug\MyApplication.exe
The following certificate was selected:
    Issued to: My comany Title CA
    Issued by: My comany Title CA
    Expires:   Sun Jan 01 05:29:59 2040
    SHA1 hash: 
Done Adding Additional Store
SignTool Error: The file is being used by another process.
SignTool Error: An error occurred while attempting to sign: ...\bin\Debug\UltimateVPN.exe
Number of files successfully Signed: 0
Number of warnings: 0
Number of errors: 1
D:\Myapplication>signtool verify Myapplication.exe
SignTool Error: A certificate chain processed, but terminated in a root
        certificate which is not trusted by the trust provider.
Number of errors: 1 

After this I treid to run my exe file and it showed me my company name as Publisher. But signing and verify both gives error. Can anybody help me know what is this error and why am I getting it.

I never thought signing an application would be this problematic - I am trying from so many days but no success yet. Once am successful in this I want to implement the same in PostBuild, but command line is only not successfully.....
I also know that for msi, I got to sign the exe present in \obj\Debug folder.
I have referred many signtool sites and forums for soem help. Many gave me different types of knowledge but none could help me get my work done.
My exe file uses my dll file which is not signed.

I am on Win 7 and VS 2008. Please help me to get the application, msi & dll files signed. I really need help - am tired doing experiments without any success. Kindly help me at the earliest.
Posted 30-Oct-11 22:16pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

@Mehdi Gholam, Not necessary that we need a key to sign an application. Using Verisign withour password key is also possible.

I GOT SOLUTION to my problem :

Well, sometimes it works perfectly well and sometimes it just fails for signing also.

Cause of Failure for Verify : Signtool provided by MS doesn't support to verify CA Certificate. Check this @Anthony Nel's resposne[^]

Cause of Failure for Signing : Probably timestamp which doesn't work always. If I provide the same command again, it works perfectly well.

Added the commands in PostBuild also and it does the job well (as I said if 1st time it creates error, build 2nd time and it works).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 31 Oct 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100