command line - Passing parameter from Client CMD through ICA file to launch published Citrix App -



command line - Passing parameter from Client CMD through ICA file to launch published Citrix App -

i'm trying send simple string parameter c# web app code using cmd line phone call ica file citrix xenapp server launch specific published application (macro scheduler macro compiled exe), not whole citrix desktop.

i have web app cmd line code using

"c:\program files (x86)\citrix\ica client\wfica32.exe" c:\someicafile.ica \param:"/username=somebodysname" .

i've tried parameter syntax: /username=somebodysname, /param:"/username=somebodysname"

and 1000000 other combinations of quotes , slashes.

i used citrix quicklaunch write ica file, in thing changed initialprogram=#applicationname \param (i added \param). i've tried /username , \param=somebodysname , can't of work either. i've tried hardcoding name in there , can't go through.

the exe expecting parameter "username" , when called locally cmd prompt works using usernameprogram.exe /username=somebodysname. made sure include "%*" @ end of commandlineexecutable in citrix xenapp application location properties ensure can take command line parameter.

this using c# , xenapp 6. works except passing parameter through, , have no thought parameter lost, if gets anywhere. sense have tried every combination of /'s \'s , "'s if please help me out syntax, i'd appreciate it! did seek looking ica client sdk in c# code, seems manually external ica file do. if wrong, however, please allow me know. i'm approaching point i'm going seek regardless because i'm out of ideas. please help.

thanks!

i ended calling .bat file c# code using following:

process proc_launch = new process(); proc_launch.startinfo.filename = "createtempica.bat"; proc_launch.startinfo.redirectstandarderror = false; proc_launch.startinfo.redirectstandardoutput = false; proc_launch.startinfo.workingdirectory = @"c:\workingdirectory"; proc_launch.startinfo.arguments = @"""/username=somebodysname"""; proc_launch.start();

reference: run bat file in c# .exe , .def code

in .bat file, create ica file passing in username paramter follows:

@echo off :makefile pushd %temp% set icafile=temp.ica @echo [wfclient] > %icafile% @echo version = 2 >> %icafile% @echo httpbrowseraddress=servername:8080 >> %icafile% @echo proxytype=auto >> %icafile% @echo connectionbar=0 >> %icafile% @echo [applicationservers] >> %icafile% @echo applicationname= >> %icafile% @echo [applicationname] >> %icafile% @echo address = applicationname >> %icafile% @echo initialprogram=#"applicationname"%1 >> %icafile% @echo clientaudio=on >> %icafile% @echo audiobandwidthlimit=1 >> %icafile% @echo cgpaddress=*:#### (use actual numbers here though) >> %icafile% @echo cdmallowed=on >> %icafile% @echo cpmallowed=on >> %icafile% @echo desiredcolor=8 >> %icafile% @echo connectionbar=0 >> %icafile% @echo twimode=on >> %icafile% @echo compress=on >> %icafile% @echo transportdriver=tcp/ip >> %icafile% @echo winstationdriver=ica 3.0 >> %icafile% @echo browserprotocol=httpontcp >> %icafile% @echo [compress] >> %icafile% @echo drivername= pdcomp.dll >> %icafile% @echo drivernamewin16= pdcompw.dll >> %icafile% @echo drivernamewin32= pdcompn.dll >> %icafile% start %icafile% popd

the %1 in initialprogram component argument used c# code.

reference: http://www.virtualizationadmin.com/files/whitepapers/metaframexp/connecting_to_a_citrix_server_from_the_command_line.htm

the lastly step create sure in citrix delivery console create sure location properties of published application commandlineexecutable has "%**" after it, including double quotes. believe adding 2nd asterisk lets parameter through command line validation , allows used when application opened. either way though, worked 2 of them , not 1 of them.

command-line parameters citrix xenapp

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -