You could do something like this:

code:
 
$tcpip = @IPAddress0
$3octet = val(substr($tcpip,9,3)) ;Assuming all of your IP addresses use a single digit class C

SELECT
Case $3octet = 1
$location = "Headquarters"
$localserver = "HQ"

Case $3octet = 2
$location = "Branch Office"
$localserver = "BR"

Case 1
"Something screwy going on if you don't have either of these IP addresses"
EndSelect

;Time to map drives

? "YOu are located at the $location office"

? "Connecting G: to \\$localserver\data"
use g: "\\$localserver\data"



[ 23. September 2003, 07:57: Message edited by: Paul_Berquam ]
_________________________
He was a good little monkey and always very curious...