Page 1 of 1 1
Topic Options
#204247 - 2012-02-09 12:54 PM Network drive is not mapping.
Biggus Offline
Fresh Scripter

Registered: 2010-11-12
Posts: 5
Loc: England
Hi All,

This is a bit of a strange one, sometimes when any of my users log in the J:\ drive is missing. If I get the user to log off and log in again the drive appears. It doesn't always not connect and it can happen to any random user. I've checked the file share permissions etc and these are OK
this is just a simple net command and everybody should get the standard drives. The only thing I can think of is that the script is still deleting drives when it starts connecting the J:\ drive. does anyone have any ideas what this could be?

 Code:
;===============================================
;Map Standard Drives
;===============================================

use * /delete /persistent
use j: "\\fileserver\scanfiles"
use p: "\\fileserver\publicfiles"
use s: "\\fileserver\documents"
use t: "\\filserver\reports"
use u: "\\fileserver\users\@userid"
use w: "\\fileserver\icons"
use x: "\\filesever\applications"

;===============================================
;Map Drives Based On Group Membership
;===============================================


Edited by Mart (2012-02-09 01:39 PM)
Edit Reason: Please use code tags when posting code.

Top
#204248 - 2012-02-09 01:19 PM Re: Network drive is not mapping. [Re: Biggus]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
It's the first drive mapping..

Do you have a policy to wait for the network to be ready? You should, particularly if you use GPO logon scripts instead of user Login scripts.

Are you using any type of SNAC in your environment that would allow connection to the DC to run the login script but block access to other network targets until the local system was validated? This might require a loop that checks the local netmask to be sure it is not 255.255.255.255 before trying to map resources.

Sounds like a timing thing, since it's only the first drive and only at random times. The above can both affect login timing.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#204249 - 2012-02-09 02:26 PM Re: Network drive is not mapping. [Re: Glenn Barnas]
Biggus Offline
Fresh Scripter

Registered: 2010-11-12
Posts: 5
Loc: England
Mart - thanks for the code tags I'll remember to do that next time.

@ Glenn I am using the user login and not GPO. No snac set up its a straight forward standard setup.

I agree it does sound like a timing thing, I think the script is still removing drives whilst it starts mapping the standard drives. Is there a way where the script will wait for completion of removing the drives before connecting the new ones?

Top
#204250 - 2012-02-09 03:12 PM Re: Network drive is not mapping. [Re: Biggus]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Script commands are linear.. one doesn't start until the prior completes. Still sounds like a network-ready issue.

The drive disconnect process doesn't require a valid network connection, but connections do. Thus, the script can complete the disconnects quickly before starting the connections.

I'd add a Sleep 5 as a temporary measure for testing.. if the problem goes away, it's timing. You might want to ping the host before trying the first connection, waiting for a response. The Ping() UDF that I wrote can be used to send 20 pings with 1 second intervals, but will return after the first response. This would be a simple way to perform a connectivity test while minimizing the delay.

You should still get to the bottom of the issue, as the above suggestions are work-arounds for the real problem. Look into the GPO setting that prevents network connections before the workstation network is ready. (wait for network)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#204251 - 2012-02-09 03:24 PM Re: Network drive is not mapping. [Re: Glenn Barnas]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
Here is the FAQ on the Fast Logon setting...
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=112428#Post112428

Top
#204252 - 2012-02-09 03:58 PM Re: Network drive is not mapping. [Re: Allen]
Biggus Offline
Fresh Scripter

Registered: 2010-11-12
Posts: 5
Loc: England
Cheers all for your input, I'm going to enable and test the GPO "Always wait for the network at computer startup and logon" as this isn't configured in my enviroment. I'll report back to see if it works, as you say sounds like a timing issue.
Top
#204514 - 2012-03-19 04:45 PM Re: Network drive is not mapping. [Re: Biggus]
Biggus Offline
Fresh Scripter

Registered: 2010-11-12
Posts: 5
Loc: England
Hi,

I've enabled the GPO and been running with it for a while, its improved but not totally fixed. any ideas?

Top
#204515 - 2012-03-19 04:54 PM Re: Network drive is not mapping. [Re: Biggus]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
Have you tried displaying the error code after the mapping?

 Code:
map x: "\\server\share"
if @error
  ? @error + ":" + @serror
endif

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 494 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.095 seconds in which 0.063 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org