Citrix states in their article: CTX807501
CTX807501 - How to Create a Batch file to set Environment Parameters
This document was published at: http://support.citrix.com/kb/entry.jspa?externalID=CTX807501
Document ID: CTX807501, Created on: Jul 13, 2000, Updated: Apr 23, 2003
Products: Citrix WinFrame 1.8
Using %Winstationname% to set Environment variables
@echo off
REM
REM *** This batch file sets an environment variable based upon
REM the environment variable WINSTATIONNAME ***
REM
SET TERMID=
if not "%winstationname%"=="console" goto second
set termid=01
goto end
:second
if not "%winstationname%"=="ipx#001" goto third
set termid=02
goto end
:third
if not "%winstationname%"=="ipx#002" goto fourth
set termid=03
goto end
:fourth
REM This handles the situation where the WINSTATIONNAME is set to something
REM not accounted for by this batch file
echo ERROR: The WinStation Name '%winstationname%' was not accounted for.
echo The environment variable TERMID was not set.
pause
goto done
:end
REM You may want to start the program the depends on the new env. var. here.
:done