Dim $LocationType Dim $Location If StringMid(@ScriptDir,2,1)=":" Then $LocationType = "Drive" Else $LocationType = "Network" EndIf Switch $LocationType Case "Drive" $Location = StringLeft(@ScriptDir,2) Case "Network" $Location = StringLeft(@ScriptDir,StringInStr(@ScriptDir,"\",-1,4)) EndSwitch MsgBox(0,$LocationType,$Location)