title: Passing parameter from Client CMD through ICA file to launch published Citrix App
body: <p>I'm trying to send a simple string parameter from C# web app code using CMD line call to ICA file to Citrix XenApp Server to launch a specific published application (Macro Scheduler macro compiled into exe), NOT the whole citrix desktop.</p>
  
  <p>I have a web app with cmd line code using </p>
  
  <pre><code>"C:\Program Files (x86)\Citrix\ICA Client\Wfica32.exe"  C:\someICAfile.ica \Param:"/username=SomebodysName" .
  </code></pre>
  
  <p>I've also tried for the parameter syntax: <code>/username=SomebodysName, /Param:"/username=SomebodysName"</code></p>
  
  <p>and about a million other combinations of quotes and slashes.</p>
  
  <p>I used Citrix QuickLaunch to write my ICA file, in which the only thing I changed was <code>InitialProgram=#ApplicationName \Param</code> (I added the \Param).  I've also tried <code>/username</code> and <code>\Param=SomebodysName</code> and I can't get any of those to work either.  I've even tried just hardcoding the name in there and I can't get it to go through.</p>
  
  <p>The exe is expecting a parameter "<code>username</code>" and when called locally from the cmd prompt it works using <code>UsernameProgram.exe /username=somebodysname</code>. I made sure to include the "<code>%*</code>" at the end of the <code>commandlineexecutable</code> in the Citrix Xenapp application location properties to ensure that it can accept a command line parameter.</p>
  
  <p>This is all using C# and XenApp 6. Everything works except passing the parameter through, and I have no idea where the parameter is lost, if it even gets anywhere.
  I feel like I have tried every combination of /'s \'s and "'s so if anybody could please help me out with the syntax, I'd really appreciate it!  I did try looking into the ICA Client SDK in the c# code, but it seems to just manually do what an external ICA file will do.  If this is wrong, however, please let me know.  I'm approaching the point where I'm just going to try it regardless because I'm completely out of ideas.  Please help.</p>
  
  <p>Thanks!</p>