I recently needed to use signtool.exe from a Windows batch script. Here is a basic script for signing binary files. It demonstrates batch script commands for setting and using variables and also changing directories.
Signtool is included with Visual Studio 2005 - 2010.
For a complete list of signtool.exe commands and options visit the MSDN page.