How to get the future pwd from a profile script?
I was pointed to this forum due to
I want to start a PS shell from the explorer context menu on different folders.
At PS startup a tool should be configured with the actual folder path.
I have tried a init / profile script for this purpose, but the pwd of the script is not the folder path: I get C:\WINDOWS\System32.
I have also checked variables but non of the available values is set to the (future) folder path.
How can I get the folder path in this case?
After the shell is started the correct folder path is available with pwd but this is to late for my purpose.