title: How to tell the difference between a VBscript is run from command line or by clicking it in a window?
body: <p>All I want to do is differentiate between the program being run by the command line or by clicking the test.vbs file in a window.</p>
  
  <p>If you run the script by typing <code>C:\testFolder\test.vbs</code> in a command prompt, then I want the program to run differently than if you double clicked <code>test.vbs</code> in the <code>testFolder</code>. </p>
  
  <p>Is there some system variable that I can use to differentiate between the two scenarios? I first attempted to use <code>WScript.Fullname</code> to determine if the pathname ended in cscript or wscript. But that didn't work so well. </p>
  
  <p>Any ideas are greatly appreciated. </p>