title: Citrix XenApp - Logoff via CMD/DLL/Something
body: <p>I need your support.</p>
  <p>Following case: I created a script for performance measure (AutoIT) which opens the Internet Explorer, loads a Citrix XenApp Page, logs in and starts an application from there.</p>
  <p>My Problem is the Logout/Disconnect/Closing of the Session.</p>
  <h2>Using the URL behind the Logoff Button</h2>
  <p>In the upper right corner is a Logoff and a disconnect Button. These both calls a Javascript function which rewrites the URL</p>
  <p>Logoff (Logoff in the Web GUI and logoff in the Citrix Session. Closes all open Windows from Citrix)
  <code>javascript:location.replace('../site/logout.aspx?CTX_Token=F692CFB5C3282DDEFE1084DAB381EAF4')</code></p>
  <p>disconnect (Logoff in the GUI, closes the session. In the next login it reopens all citrix windows)
  <code>javascript:location.replace('../site/disconnect.aspx?CTX_Token=F692CFB5C3282DDEFE1084DAB381EAF4')</code></p>
  <p>The CTX_Token is not static. After every logon I have a new token.</p>
  <p>My goal is: To close, if there is one, the open session, before I open a new session.</p>
  <p>Call the URL without token, with token set to 0 and to complete F/0,</p>
  <ul>
  <li>../site/logout.aspx</li>
  <li>logout.aspx?CTX_Token=0</li>
  <li>logout.aspx?CTX_Token=00000000000000000000000000000000</li>
  <li>logout.aspx?CTX_Token=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF</li>
  </ul>
  <p>Every time I get only a State Error</p>
  <blockquote>
  <p>State Error</p>
  <p>There is a problem with your session. For security reasons, you must close your browser window and log on again to continue accessing your resources.</p>
  <p>To log on again, you must restart your browser.</p>
  </blockquote>
  <p>No success on this way :/</p>
  <h2>A Parameter in the Citrix Connection Center</h2>
  <p>My next hope was a Parameter in the Receiver.exe to disconnect the session.</p>
  <p>In the GUI of the concentr.exe is a disconnect and logoff button.
  But the exe has no help in the cmd.
  It seems, that this exe has parameters (Task Manager <code>concentr.exe /startup</code>
  I tried it with following parameters. Every time only the GUI starts...</p>
  <ul>
  <li>?</li>
  <li>help</li>
  <li>logoff</li>
  <li>quit</li>
  <li>kill</li>
  <li>exit</li>
  <li>stop</li>
  <li>shutdown</li>
  <li>settings</li>
  </ul>
  <p>Maybe one of you have an idea...</p>
  <h2>Quit the Citrix Connection Center and the Citrix Receiver</h2>
  <p>These both ways are like disconnect in the Webgui.</p>
  <p>Not that what I wanted..</p>
  <h2>Close the IE (logoff in the Browser) and kill the open Citrix Windows</h2>
  <p>Not really the correct way. It is possible, that there is process which survives everything</p>
  <h2>Other ways?</h2>
  <p>I searched for DLL Calls, for APIs, CMD and other stuff. I found nothing.</p>
  <p>Maybe here is a Citrix Pro which is reading this and can deliver me an answer.</p>
  <p>Have a nice day</p>
  <p>Nice regards</p>
  <p>Hagen</p>