1 – Creating the certificate

I created a bat file to automate the process of creating a self-signed certificate.
Make sure to run “MakeCert.bat” with “run as Administrator”. This will create a certificate file and register it as valid.
You must edit the values in bold & underlined with your own.

2 – Signing your binary

I also created a bat file to automate the process of signing your binary. All that is left to automatically sign your binary file, is to drop your binary on “2-SignBinary.bat”.
You must edit the values in bold & underlined with your own.

Tips

Make sure to run “MakeCert.bat” with “run as Administrator”.

Remember to re-sign your application each time you recompile it.
You can use the post-build event of Delphi to automate this process. If you use <= Delphi 7 there is this extension (free) or Eurekalog (150$) which allows you post-build events.