You can take several routes to get what you want.

  • If the systems have a unique site identification in their name you could get a substring of the @WKSTA macro and act upon the outcome.
  • You could also use (a part of) @IPADDRESS0 and create the shortcuts if it matches a certain value. Beware the @IPADDRESS macro always returns three positions for each octet. It will return 192.168. 1. 1 if your IP is 192.168.1.1 (note the spaces in octet 3 and 4).
  • If they are in different sites in AD you can use the @SITE macro.

It all depends on your setup.

Some examples:
 Code:
Select
	Case Left(@IPADDRESS0, 11) = "192.168.  1"
		;do stuff
	Case Left(@IPADDRESS0, 11) = "192.168.  2"
		;do other stuff
EndSelect

or
 Code:
Select
	Case @SITE = "AAA"
		;do stuff
	Case @SITE = "BBB"
		;do other stuff
EndSelect

or
 Code:
Select
	Case InStr(@WKSTA, "SITEA")
		;do stuff
	Case InStr(@WKSTA, "SITEB")
		;do other stuff
EndSelect
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.