Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: setup Deployment
Hi,

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
tamp.verisign.com/scripts/timestamp.dll <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 
</fullpath>
 
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 23:16pm
Rate this: bad
good
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).
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 130
4 DamithSL 95
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 31 Oct 2011
Copyright © CodeProject, 1999-2014
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