Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » Adsi

Verify Signatures for All the Scripts in a Folder in Windows

You can use any of the VBScript programs below in ActiveXperts Network Monitor. Click here for an explanation about how to include scripts in ActiveXperts Network Monitor.

Verify Signatures for All the Scripts in a Folder in Windows using VBScript, WMI and LDAP

Example(s)

blnShowGUI = False

set objSigner = WScript.CreateObject("Scripting.Signer")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\Scripts\")
Set colListOfFiles = objFolder.Files

For Each objFile in colListOfFiles
    If Right(objFile.Name, 3) = "vbs" Then
        blnIsSigned = objSigner.VerifyFile(objFile.Path, blnShowGUI)
        If blnIsSigned then
            WScript.Echo objFile.Name & " has been signed."
        Else
            WScript.Echo objFile.Name & " has not been signed."
        End If
    End If
Next