Dear Forum,

Server side: OES 11 SP2 and 2015 SP1
Client side: Windows 7 x64 (latest updates, latest Novell/OES Client, latest iPrint client, etc.)

I'm running an external batch file from the login script. (Tests if directory exists, creates directories in the users home directory if not exist, populates template files, etc. Nothing special - only basic DOS/Windows shell commands.) Let's call this as "template.bat".

Sometimes and somehow the batch file gets stucked in on the client. I see the file "template.bat" is open via Remote Manager. Then, no one can login into the network anymore - the "template.bat" is locked, and all clients get stucked on the login script.

If I close the stucked connection on the file "template.bat" manually, all the other clients go on, and their login script completes.

I cannot reproduce it manually. I have started "template.bat" many times, and it worked properly. However, it stucks in about 1-3 times per week in a network with ~1000 users.

If I disable oplocks on the server, the problem goes away - as well is client-side caching goes away too. This is not acceptable for performance reasons.

Basically, I have two questions:

- Why and how can a simple cmd batch file stuck in?
- Why does it have an exclusive lock on the batch file itself? There's no write operation there, only read/execution.

Any ideas?
Thank You!