MSDN Library

Scripting.Signer Object

The Scripting.Signer object enables an author to sign a script with a digital signature and a recipient to verify the signature's authenticity and trustworthiness.

The Scripting.Signer object requires a valid certificate.

The following JScript code shows the Scripting.Signer object digitally signing a script.

   <named name="file" helpstring="the file to sign" required="true" type="string"/>
   <named name="cert" helpstring="the name of the signing certificate" required="true" type="string"/>
   <named name="store" helpstring="the name of the certificate store" required="false" type="string"/>
<script language="JScript">
   var Signer, File, Cert, Store = "my";
   if (!(WScript.Arguments.Named.Exists("cert") && WScript.Arguments.Named.Exists("file"))) 
   Signer = new ActiveXObject("Scripting.Signer");
   File  = WScript.Arguments.Named("file");
   Cert  = WScript.Arguments.Named("cert");
   if (WScript.Arguments.Named.Exists("store"))
      Store = WScript.Arguments.Named("store");

    Signer.SignFile(File, Cert, Store);

Community Additions

© 2015 Microsoft