I was redirected to this forum, so here goes.
Quote:

Hello all,

Last Thursday or Friday, I started getting calls about some people's network drives not getting mapped. I ran the script in debug mode, and I found that the script is exiting before it's completed. Right in the middle of the script, for no good reason. The whole script is to map an S: drive depending on which department you are in. This script has worked for about a year or so without a hitch, and now it's exiting at this code:

Code:
  


$X = "\\kdata02\"
$name = @USERID
Use s: /Del /persistent


:PROGRAMMERS

If InGroup("Programmers")
Use q: /Del
Use q: $X+"development"
?"Q: drive mapped to Development share"
EndIf


:YEARENDTAX

If InGroup("YearEndTax")
Use y: /Del
Use y: $X+"yearendtax"
?'Y: drive mapped to YearEndTax share'
EndIf



:ACCOUNTING

If InGroup("accounting") OR InGroup("Finan Actg Intern") OR InGroup("Accounts Receivable")


If $name = "skutlen"
GoTo BILLING
EndIf
Use s: $x+"accounting"
?'S: drive mapped to accounting share'
EndIf


:BILLING

If InGroup("billing") OR InGroup("commercial billing") OR InGroup("utility billing") OR InGroup("residential billing")
If $name = "claassek"
GoTo Surgery Payroll
EndIf
Use s: $x+"billing"
?'S: drive mapped to Billing share'
EndIf


:SURGERYPAYROLL

If InGroup("SurgeryPayroll")
If $name = "mazurd"
GoTo INFOSPAN
Else If $name = "nealv"
Use q: $x+"Surgery Payr"
GoTo INFOSPAN
EndIf
Use s: /Del
Use s: $x+"Surgery Payr"
?'S: drive mapped to Surgery Payroll share'
EndIf



:INFOSPAN
;This drive letter has to be x in order for infospan to run properly
If InGroup("infospan users")
Use x: "\\Infospan\Shared"
?'X: drive mapped to Infospan share'
EndIf


:PERSONNEL

If InGroup("personnel") OR InGroup("employee records") OR InGroup("office services")
Use s: $x+"personnel"
?'S: drive mapped to Personnel share'
EndIf


:MARKETING

If InGroup("MARKETING")
Use s: $x+"marketing"
?'S: drive mapped to Marketing share'
If InGroup("Residential Services")
Use r: /Del
Use r: $x+"Residential"
?'R: drive mapped to Residential share'
GoTo TREASURY
EndIf
EndIf


:RESIDENTIAL

If InGroup("residential services")
Use s: $x+"Residential"
?'S: drive mapped to Residential share'
EndIf


:UTILITY

If InGroup("utility") OR InGroup("utility services")
Use s: $x+"utility"
?'S: drive mapped to Utility share'
EndIf


:SAFETY

If InGroup("safety")
Use s: $x+"safety"
?'S: drive mapped to Safety share'
EndIf


:PURCHASING

If InGroup("purchasing")
Use s: $x+"purchasing"
?'S: drive mapped to Purchasing share'
EndIf


:EQUIPMENT

If InGroup("equipment")
Use s: $x+"equipment"
?'S: drive mapped to Equipment share'
EndIf


:ACQUISITION

If InGroup("acquistion integrat")
Use L: /Del
Use L: $x+"Acquisition"
?'L: drive mapped to Acquisition share'
EndIf


:NEWVENTURES

If InGroup("New Ventures")
Use h: /Del
Use h: "\\kdata02\new ventures"
?"H: drive mapped to New Ventures share"
EndIf





:END

Exit





The script exits just after the Marketing section. The reason for the goto is to skip the very next If InGroup line, as there is a person in Marketing that is also in Residential Services, and mapping two S: drives isn't productive.

This particular code happens to be on line 125, not the problem in my opinion. Any ideas?




$X is pointing to the correct server.