VBScript important notes

  • In every script created, there must be a Function named Main. GFI LanGuard will look for and start from this function when executing any script.
  • The return value of the Main function to the scripting engine is a Boolean (true or false). The return value is specified by assigning the result value to a variable which has the same name of the function name (example: if the function is named MyFunction, the return value is specified as MyFunction = true). This return value is generally specified at the end of the function.
Example

Function Main

'Show some text in the scanner activity window

echo "Script has run successfully"

'return the result

Main = true

End Function