Written by:R Teachout7/3/2008 8:49 AM
Here's a snippet of code that I use at the top of vbs files to ensure they are only run from a command line, because I hate having to click 'OK' hundreds of times. if lcase(right(Wscript.FullName, 11)) <> "cscript.exe" then wscript.echo "*****************************************************************" & VbCrLf & _ "How to use this: 'cscript " & Wscript.ScriptName & " ARGUMENT" & VbCrLf & _ "*****************************************************************" wscript.quit 0 end if