We should avoid hard coding of paths in tests as this adds to portability of test from one machine other.
Consider an action having following statement –
Execute File (D:\GSB\QTP\fucntion\test.vbs)
When tests are ported on a different machine then there is no guaranteed about drive mapping being same.
To over come this, we can read path run time instead of hard coding it; as following -