Batch file problem

Hello,

I have the following problem with Power Rail. I have created a batch file that creates a smartline from a couple of points. When I run the batch file from inside Power Rail the smartline is created.However when I run the batch file from the system command line in batch mode without opening Power Rail the process failures (it exports log file that describes all the procedure with the errors). Does anyonoe know why is this happening?? I have attached all the files that I used.

Thank you

files.rar