WScript.ScriptName (Property)

A string containing the name of the script.

Availability:

JScript - 3.0
Property/method value type:String primitive
JavaScript syntax:WSHmyName = WScript.ScriptName

With this property, you can create scripts that will behave differently according to the name under which they are executed.