Alex K. Angelopoulos submitted the following:

"This script allows you to make a quick connection to a Citrix server without generating an ICA file or entry. The syntax, assuming you use the name ica.cmd for the file, is:

ica <ip-address or dns name> \[<resolution>\]

Where \[<resolution>\] is an optional integer in the range 0-5 which controls the resolution of the resulting ICA connection.

DEPENDENCIES

-Citrix client already installed (tested using version 6.01.963)
-<a href="/article/jsifaq/jsi-tip-3277-the-windows-2000-server-resource-kit-supplement-one-cd-rom-can-be-installed-on-a-server-or-workstation-.aspx"><b>sleep</b></a> command (used on line 61 to allow deletion of tmp.ica file after launch)
-OS Compatibility: tested on NT4 Server SP6a,Win2K Pro SP1 and SP2,WinXP Pro RC2

<b>OPTIONAL</b>
-If you uncomment line 56, the date, time, and server you attempt to contact will be appended to %TEMP%\ica.log
-If the sleep command is unavailable, comment out lines 54 and 55 ( sleep 2 and  del %icafile%).
 If you do this, the tmp.ica file will not be automatically deleted from your %TEMP% folder."

<b>ICA.cmd</b> contains:

@echo off
rem created by Alex K. Angelopoulos
rem April 2001
rem a l e x a n g e l o p o u l o s @ h o t m a i l.com
rem Takes 2 arguments, IP address and (optional) resolution integer
(0-320,1-512,2-640,3-800,4-1024,5-1152)
rem Go to Help section if "traditional" switch or no arguments issued
if \{"%1"\} <h1><a name="_goto_HELPTEXT_if_1_"> \{""\} goto :HELPTEXT
if \{%1\} </a></h1> \{^/^/\} goto :HELPTEXT
if \{%1\} <h1><a name="_goto_HELPTEXT_if_1_"> \{^/?\} goto :HELPTEXT
if \{%1\} </a></h1> \{^/h\} goto :HELPTEXT
if \{%1\} <h1><a name="_h_goto_HELPTEXT_if_2_"> \{-h\} goto :HELPTEXT
if \{%2\} </a></h1> \{\} (
 set width=640 & set height=480 & goto makefile
)else if \{%2\} <h1><a name="_0_set_width_320_amp_set_height_240_amp_goto_makefile_else_if_2_"> \{0\} (
 set width=320 & set height=240 & goto makefile
)else if \{%2\} </a></h1> \{1\} (
 set width=512 & set height=384 & goto makefile
)else if \{%2\} <h1><a name="_2_set_width_640_amp_set_height_480_amp_goto_makefile_else_if_2_"> \{2\} (
 set width=640 & set height=480 & goto makefile
)else if \{%2\} </a></h1> \{3\} (
 set width=800 & set height=600 & goto makefile
)else if \{%2\} <h1><a name="_4_set_width_1024_amp_set_height_768_amp_goto_makefile_else_if_2_"> \{4\} (
 set width=1024 & set height=768 & goto makefile
)else if \{%2\} </a></h1> \{5\} (
 set width=1152 & set height=864 & goto makefile
)else goto HELPTEXT
:makefile
pushd %temp%
set icafile=tmp.ica
@echo \[WFClient\] > %icafile%
@echo Version = 2 >> %icafile%
@echo \[ApplicationServers\] >> %icafile%
@echo ; Name below will appear in the title bar of ICA client >> %icafile%
@echo ; It MUST be identical to the connectoid header >> %icafile%
@echo %1 = >> %icafile%
@echo ; connectoid header is in brackets below; MUST match friendly name above >> %icafile%
@echo \[%1\] >> %icafile%
@echo ; Server IP address or DNS name goes here >> %icafile%
@echo Address = %1 >> %icafile%
@echo TransportDriver = TCP/IP >> %icafile%
@echo Username = >> %icafile%
@echo Compress = On >> %icafile%
@echo PersistentCacheEnabled = On >> %icafile%
@echo InitialProgram = >> %icafile%
@echo WinStationDriver = ICA 3.0 >> %icafile%
@echo DesiredColor = 0 >> %icafile%
@echo DesiredHRES = %width% >> %icafile%
@echo DesiredVRES = %height% >> %icafile%
rem Launch and log
rem remaining files in TEMP will be ica.log and tmp.ica
start %icafile%
sleep 2
del %icafile%
rem echo %DATE% %TIME% %1 >>ica.log
popd
goto eof
:HELPTEXT
@echo.
@echo Syntax: %0 ^<hostname> \[ ^| 0 ^| 1 ^| 2 ^| 3 ^| 4\]
@echo     where the integer sets resolution:
@echo        0 - 320x240
@echo        1 - 512x384
@echo        2 - 640x480
@echo        3 - 800x600
@echo        4 - 1024x768
@echo        5 - 1152x864
@echo.
@echo If no size chosen, defaults to 640x480
@echo.
:eof
</hostname>