Option Explicit
Dim oAPI, oArgs
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oArgs = WScript.Arguments
' Check to see if the required script arguments are there.
' In this example, at least three arguments are required.
' If the arguments do not exist, log a script event.
If oArgs.Count <3 Then
' If the script is called without the required arguments,
' create an information event and then quit.
Call oAPI.LogScriptEvent("LogScriptEvent.vbs", 101, 0, "LogScriptEvent script was called with fewer than three arguments and was not executed.")
WScript.Quit -1
End If
' When it passes the required arguments check satisfactorily, the
' remaining script, located here, is run.