How to sign a .exe file with as USB token from GlobalSign.
First, the USB token must be connected to the computer. In order to use the token, the driver software must be installed, which can be downloaded from the homepage (SafeNet driver).
The token should show up in the software. This will not work via Remote Desktop, the token will not show up in the software if you are connected remotely.
If you are connected directly, the token will be shown:
You can now sign the file with the following command.
signtool sign /t http://timestamp.digicert.com /fd SHA256 service.exe
If there are multiple certificates available, you will get an error message.
In that case, you can define the correct certificate by using the SHA1 hash of the certificate in the command.
signtool sign /t http://timestamp.digicert.com /SHA1 07933D9XXXXXXXXXXXXXXXXXXXXXXXXXX /fd SHA256 service.exe