Or the InGroup() is not picking up the "LoginScript_QA" check, and therefore setting $path="", which would give the exact result that your.e experiencing.

Orrr, that first check is failing since @scriptdir=@ldrive will never be true, and then the second check is returning true and sending it to RunQA, which skips the part that sets $path.