Here is one that gives the calling folder, program line and the name of the program.
David
'********************************************************************************************
'This function returns the path from which the script was called
'Call ScriptPath(strFolder,strCommand,strProgramName)
'wscript.echo "Called from folder : -> " & strFolder
'wscript.echo "Calling Program Line : -> " & strCommand
'wscript.echo "Calling Program Name : -> " & strProgramName
'wscript.quit
Function ScriptPath(callingfolder, callingcommandline, callingprogramname)
ScriptPath=Left(Wscript.scriptfullname,Instr(1,WScript.ScriptFullName,wscript.scriptname,1)-1)
callingfolder=scriptpath
callingcommandline=wscript.scriptfullname
callingprogramname=left(wscript.scriptname,len(wscript.scriptname)-4)
End Function
'********************************************************************************************