Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
[The SignedCode object is available for use in the operating systems specified in the Requirements section. Instead, use Platform Invocation Services (PInvoke) to call the Win32 API SignerSignEx, SignerTimeStampEx, and WinVerifyTrust functions to sign content with an Authenticode digital signature. For information about PInvoke, see Platform Invoke Tutorial. The .NET and CryptoAPI via P/Invoke: Part 1 and .NET and CryptoAPI via P/Invoke: Part 2 subsections of Extending .NET Cryptography with CAPICOM and P/Invoke may also be helpful.]
The SignedCode object provides functionality for signing executable files with an Authenticode digital signature.
The SignedCode object is used to perform the following tasks:
The SignedCode object has these types of members:
The SignedCode object has these methods.
Method | Description |
---|---|
Sign | Creates an Authenticode digital signature and signs the executable file specified in the SignedCode.FileName property. |
Timestamp | Creates an Authenticode time stamp signature on the signed executable file specified in the SignedCode.FileName property. |
Verify | Verifies the Authenticode signature on the signed executable file specified in the SignedCode.FileName property. |
The SignedCode object has these properties.
Property | Access type | Description |
---|---|---|
Certificates |
Read-only |
A Certificates collection that contains all the certificates in the signed executable file. |
Description |
Read/write |
A string that contains a description of the signed executable file. |
DescriptionURL |
Read/write |
A string that contains the HTTP address to a description of the signed executable file. |
FileName |
Read/write |
A string that contains the path to the content file that contains the executable file. This is the default property. |
Signer |
Read-only |
A Signer object that provides access to the signer of the executable file. |
Timestamper |
Read-only |
A Signer object that provides access to the time stamper of the executable file. |
The SignedCode object can be created, and is not safe for scripting. The ProgID for the SignedCode object is CAPICOM.SignedCode.1.
The executable file should be of a type that can be signed with Authenticode technology, for example, files that have a file name extension of .cab, .cat, .exe, .dll, .vbs, or .ocx.
Requirement | Value |
---|---|
Redistributable |
CAPICOM 2.0 or later on Windows Server 2003 and Windows XP |
DLL |
|
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today