I recently implemented KiXtart 2010 into my environment to replace all my old .bat login scripts. I borrowed fairly heavily from the adminscripteditor.com script library Domain Login Script. Now, I am seeing sporadic cases where workstations don't get mapped drives, and other cases where the drives map but all disappear about 20 minutes later. I have not been able to determine yet if the two instances are related. On workstations where drives don't get mapped, manually running the KIX executable seems to work (I will be investigating the XP wait on network setting). The script is fairly basic, thus (I have abridged redundant sections and sanitized it a bit):

Code:

; *** Login Script for all domain users ***

$ErrorFile = "\\recordingserver\Errorlogs\@WKSTA_ERR.TXT"

CLS

; Everyone gets the G drive


$Path = "\\nas\apps"
$Drive = "G"
Gosub Map


; HR is the only group that doesn't get the J drive

If NOT INGROUP("HR")
$Path = "\\server2\Drive"
$Drive = "J"
Gosub Map
EndIf

; Begin mapping drives for the individual groups


If INGROUP("Group1")
$Path = "\\callserver1\ccrecordings$"
$Drive = "P"
Gosub Map
$Path = "\\callserver2\ccrecordings$"
$Drive = "Q"
Gosub Map
$Path = "\\callserver3\ccrecordings$"
$Drive = "R"
Gosub Map
EndIf

IF INGROUP("Legal")
$Path = "\\nas\legal"
$Drive = "R"
Gosub Map
EndIf

IF INGROUP("IT")
$Path = "\\remotenas\software"
$Drive = "R"
Gosub Map
$Path = "\\ITServer\Drive"
$Drive = "W"
Gosub Map
$Path = "\\ITServer\install$"
$Drive = "Y"
Gosub Map
EndIf

IF INGROUP("HR")
$Path = "\\nas\hr"
$Drive = "U"
Gosub Map
EndIf

IF INGROUP("scangroup")
$Path = "\\nas\scan"
$Drive = "S"
Gosub Map
EndIf

Exit


:Map
Use $Drive+":" /Del /PERSISTENT
Use $Drive+":" $Path
If @error = 0
? " "+ $Drive+":" + $Path + " MAPPED"
Else
Color y+/n
? " MAP "+ $Drive+":" + $Path + " FAILED !"
Color w/n
Gosub ErrLog
EndIf
Return


:ERRLOG
If Open (1, $ErrorFile, 5) = 0
WriteLine(1, $Drive + ": " + $Path + " not mapped | @ERROR | @DATE | @TIME | @USERID | @WKSTA | @FULLNAME" + Chr(13) + Chr(10))
Else
? "Error openning 'ErrorLogs'"
EndIf
Close (1)
Return




I am seeing error files from some workstations, but in all cases the @ERROR code is 0. Any thoughts/input would be helpful. G and J drives seem to be the most problematical, but then nearly everyone in the domain gets them so they are almost certainly over-represented.


Edited by Allen (2006-06-07 01:32 AM)