JSI Tip 9216. How can I tell if my .VBS script was invoked by Cscript.exe or Wscript.exe?


Sample
script=Wscript.FullName
work = Replace(script, "cscript", "x")
if work  script then
 Wscript.Echo "Cscript"
end if



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish