scripting:api:wscript:script-full-name

ScriptFullName

Property of IWScript

Returns the full path of the currently running script

Read-Only Property of type BSTR

var sVal = WScript.ScriptFullName;
sVal = WScript.ScriptFullName
BSTR sVal;
HRESULT hr = WScript.get_ScriptFullName(&sVal);