I am looking for something like..
If RUNNING_THROUGH_WSCRIPT = True Then
WScript.Echo "This script is running through wscript.exe"
Else
WScript.Echo "This script is running through cscript.exe"
End If
I have a VBScript that can only run through cscript.exe
. wscript.exe
gives an error. I can easily go to properties and change default program but if say I was to give the script to a client then I would like him/her to not worry about such things.
It needs to be very easy to use without any complications beyond double-clicking on the file.
I can easily make a VBScript detect it own path and then run itself through a program of my choosing but before I can do that I need to detect the program through which it is already running.
Anyone know how?