You are here:
ActiveXperts.com > ActiveXperts Network Monitor > WindowsManagement > Scripts > Security
Quicklinks
blnShowGUI = False
set objSigner = WScript.CreateObject("Scripting.Signer")
blnShowGUI = False
blnIsSigned = objSigner.VerifyFile("C:\Scripts\CreateUser.vbs", blnShowGUI)
If blnIsSigned then
WScript.Echo "Script has been signed."
Else
WScript.Echo " Script has not been signed."
End If
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
objSigner.SignFile objFile.Path, "IT Department"
Next
set objSigner = WScript.CreateObject("Scripting.Signer")
objSigner.SignFile "C:\Scripts\CreateUsers.vbs", "IT Department"
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