Search code examples
certificateexecode-signing

How to sign .EXE File


I am distributing an Excel File which is going to be distributed as .EXE file and have some questions.

I am a newbie, so please explain as much as you would to someone non-tech.

I basically, don't want the Microsoft SmartScreen to show as 'suspicious' or my Anti-Virus to pick it up as a virus and delete it.

Please guide me what should I use? I saw EV and OV Certificates and don't know the difference in the code signing certificates.

Also, when I update the code in VBA, do I need to purchase the certificate again or whats the process?

Thanks.


Solution

    1. Get 1 code signing certificate (for both signatures 2./4.) from a trusted CA - yeah, that means spending money.
    2. Sign the Excel VBP Project, every time the VBA Code changes!), for instance with the integrated development environment (IDE) in Excel.
    3. Wrap the Excel file in the EXE
    4. Sign the exe file with https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe
    5. Bonus :) Next time you have a non-programming question post it at superuser.com

    Here are some vendors (I'm not affiliated and just did a web search for the first results):