@echo off rem created by Alex K. Angelopoulos rem April 2001 rem winxp@techie.com rem Takes 2 arguments, IP address and (optional) resolution, 0-320,1-512,2-640,3-800,4-1024,5-1152 rem VARIABLE INITIALIZATION set LOOPNUM=10 rem If the console window pauses very long after connection starts, rem lower this number; rem If you get a "File not found" messagebox, increase it. rem Go to Help section if "traditional" switch or no arguments issued if {"%1"} == {""} goto :HELPTEXT if {%1} == {^/^/} goto :HELPTEXT if {%1} == {^/?} goto :HELPTEXT if {%1} == {^/h} goto :HELPTEXT if {%1} == {-h} goto :HELPTEXT if {%2} == {} ( set width=640 & set height=480 & goto makefile )else if {%2} == {0} ( set width=320 & set height=240 & goto makefile )else if {%2} == {1} ( set width=512 & set height=384 & goto makefile )else if {%2} == {2} ( set width=640 & set height=480 & goto makefile )else if {%2} == {3} ( set width=800 & set height=600 & goto makefile )else if {%2} == {4} ( set width=1024 & set height=768 & goto makefile )else if {%2} == {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% rem The DIR statement below is a crude time delay. for /L %%i in (1,1,%LOOPNUM%) do dir %windir% > NUL del %icafile% rem echo %DATE% %TIME% %1 >>ica.log popd goto eof :HELPTEXT @echo. @echo Syntax: %0 ^ [ ^| 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. @echo NOTE: If you get an occasional "file not found" @echo error, increase the value of LOOPNUM inside the script :eof