OK the tpalogin or clwlogin does not run.. They do however run if I run them via GP or call them from a bat file.

What did you change in the code?