When you break it down this sub isn't too bad to understand, let me see if I can clarify a bit:
Sub ForceCScript()
If InStr(UCase(WScript.FullName), "CSCRIPT.EXE") = 0 Then
Dim objShell : Set objShell = CreateObject("WScript.Shell")
objShell.Run "%comspec% /k cscript.exe " & Chr(34) & WScript.ScriptFullName & Chr(34), 1, False
WScript.Quit()
End If
End Sub
ok, the first IF statement is determining if WSCRIPT.EXE or SCRIPT.EXE is currently running this script. It does that by referencing a system value of WScript.Fullname and then looking for CSCRIPT.EXE in it. If it isn't found, then we need to stop running, and restart in CSCRIPT.EXE mode. So inside the IF block, we define a handle top the Shell opbject, and then use the Run methond it provides to launch an executable. That executes a command as if it was entered at a command line prompt and basically runs this script a second time, but this time running it under CSRIPT. After it starts that new copy of the script it does a Quit to end this running copy, which wasn't using CSCRIPT.
Okay, on to the rest of the question. If you are scheduling or trying to execute a vbs script, you can either just "run" the filename.vbs file, or you can explicitly do something like cscript filename.vbs. If you are running what are often referred to as batch scripts that don't involve windows activity, then I typically use a command line (which could be in the windows scheduler) of cscript //nologo filename.vbs followed by any parms I need to pass to it, and if desired redirecting the output to a text file. This keeps it from displaying much to the screen at all.
If you don't know how the script will be run, and there is a possibility it can be run by a user double clicking on it, or just entering filename.vbs at a command line, and you want it to run in either cscript or wscript, then the SUB can be useful to force it into the desired run mode.
~bp