To digitally sign any DLL, EXE, or CAB, you only need your digital certificate in a PFX file and SignTool.exe, which can be downloaded from here: http://msdn2.microsoft.com/en-us/library/8s9b9yaz(VS.80).aspx
If you’re using Visual Studio 7 or 8, you probably already have signtool.exe in the "Common7″ subdirectory where Visual Studio is installed.
Here’s a .bat demonstrating how to authenticode sign a DLL (or EXE, or CAB):
set File=ChilkatFtp2.dll
set TimeURL=http://timestamp.verisign.com/scripts/timstamp.dll
REM : This should be a single line in your .bat file:
c:\"Program Files"\"Microsoft Visual Studio 8"\Common7\Tools\Bin\signtool sign /f c:\ck2000\thawte\chilkat.pfx
/p myPassword /v /t %TimeURL% "%File%"
pause