what is the best way to map a share before bundle installation?

I created a bat script to run before bundle installation to map the drive:

net use x: \\ip_of_samba_server\softwaredirectory

The script usually fails to map the drive, sometimes it works.

If I type the command in cmdprompt it always works but it takes maybe 20-30 sec before it is successful.

Usually it is fast to browse with the windows explorer to the location but sometime it takes almost forever..

Is Samba miss configured or can it be because we use Novell network as default network not MS Client?