'======================================================================================================================= ' WScript compatibility shim for AxonASP CLI (axonasp-cli -m vbscript) '======================================================================================================================= ' AxonASP has no WScript host object. This defines the parts the generator scripts use: ' WScript.Arguments (Count, Item) - read from environment variables ARG1..ARG9 (set by scripts\gen.cmd) ' WScript.ScriptFullName - a path inside scripts/ (only its folder is used) ' WScript.Echo / WScript.Quit - Quit stops the script (exit code is not propagated by the CLI) ' Loaded by each generator with: ExecuteGlobal Class WScript_Shim Public Arguments Public ScriptFullName Private Sub Class_Initialize() Dim sh, i, v Set sh = CreateObject("WScript.Shell") Set Arguments = CreateObject("Scripting.Dictionary") For i = 1 To 9 v = sh.ExpandEnvironmentStrings("%ARG" & i & "%") If v = "%ARG" & i & "%" Then Exit For Arguments.Add Arguments.Count, v Next ScriptFullName = Server.MapPath("/scripts/generator.vbs") End Sub Public Sub Echo(s) Response.Write s & vbCrLf End Sub Public Sub Quit(code) Response.End End Sub End Class Dim WScript : Set WScript = New WScript_Shim