Error returns 0.

I forgot to mention that there's another domain on server2.
Does it metter?

Here's the correct architecture:
server1 is a domain controller, to which users login.
server2 is a file server where the kix script files are positioned. It also conatins, because of historical reasons, an old domain, to which no one logins.

For each user in the domain of server1 defined a.bat, which calls b.bat on server2, which calls the kix script.

Thanks again,
V.F.