in reply to Connecting to network shared drive

Which is the protocol you use to share the drive? SMB? And which is the OS on the machine that needs connecting? Who is the owner of the share? The user that should run the connecting script has access to the share?

Too many question, too little information...

Rule One: Do not act incautiously when confronting a little bald wrinkly smiling man.