If you want to code-sign a EXE or DLL in a batch file you can copy and paste the command below to a batch file.
Update the path to your PFX certificate file and enter your password.
The call the batch file passing the path and name of the file to sign as the first parameter to the batch file.
signtool sign /as /fd sha256 /f "C:\Projects\Installers\Code-Signing Certificate\YouCertificate.pfx" /p password /tr http://timestamp.geotrust.com /td sha256 %1