Hi mdress,

I know Glenn offers a very nice solution that is very useable. He is very skilled and has helped this community a lot over the years. I prefer writing something myself but that is just personal preference.

This should get you started. I added lots of comments so you can see what is going on and where what happens.

I use the @IPADDRESS0 macro in the example below. this returns the IP address with three places per octet so "10.20.1.2" will be " 10. 20. 1. 2".

 Code:
;Set Break state to On so closing the script is possible without logging off
;In a production environment you may want to remove the Break line or set it to off (same result as removing it).

Break on

;Select which case is true.
;If one case is true all following cases are skipped.
;Case 1 is always true if no case above it is true.
Select
	;Read first 8 characters of @IPADDRESS0
	Case Left(@IPADDRESS0, 8) = " 10. 20."
		;Frist 8 characters are " 10. 20."
		;Display some text on screen.
		? "You are in subnet 10.20."
		;Add nor stuff for subnet 20 here.
	;Read first 8 characters of @IPADDRESS0
	Case Left(@IPADDRESS0, 8) = " 10. 21."
		;Frist 8 characters are " 10. 21."
		;Display some text on screen.
		? "You are in subnet 10.21."
		;Add nor stuff for subnet 21 here.
	;Read first 8 characters of @IPADDRESS0
	Case Left(@IPADDRESS0, 8) = " 10. 22."
		;Frist 8 characters are " 10. 22."
		;Display some text on screen.
		? "You are in subnet 10.22."
		;Add nor stuff for subnet 22 here.
	;Read first 8 characters of @IPADDRESS0
	Case Left(@IPADDRESS0, 8) = " 10. 23."
		;Frist 8 characters are " 10. 23."
		;Display some text on screen.
		? "You are in subnet 10.23."
		;Add nor stuff for subnet 23 here.
		;None of the cases above are true so default to case 1
	Case 1
		? "You are not in subnet 10.20, 10.21, 10.22 or 10.23. Please contact your admin"
EndSelect
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.