How to get folder path beside using the getenv/var/folder

I have a script that get the current directory path, using “Get Environment Var”. However it is a library package that I published. When I call the workflow from different script, it give me the path of where the package resides, which is not the same where I am running the script from". Besides the fact that I can call the “Get Env Var” from the execution script, is there any other way?
Thanks

In UiPath, you can use the Directory.GetCurrentDirectory method to retrieve the current directory path of the executing script. This method returns the path of the directory from which the process is running.

Hi, thanks for the reply, unfortunately, it didn’t work. I assigned a var
strA = Directory.getCurrentDirectory
and just write it out from testcase, I am still getting the path to package