Jump to content
Sign in to follow this  

Web Citrix session timeout - Help please!

Recommended Posts


We have a number of Citrix users who access remote services over https using IE.

In one office they have a small workgroup that needs to synchronise a couple of local directories with the 'cloud'. They are graphc designers and only need to publish the final versions of their work. An application (Allway Sync) does the job perfectly! We have published it through Citrix and the client can start it and sync the necessary directories. The sync process runs constantly to ensure that the local release dir is within 10 minutes of the publicly published version on the cloud.


After a period of inactivity on the kbd,mouse and interface of the workstation running the sync, the Citrix session is killed and the connection is terminated. Thus the sync process dies and the directories get out-of-date...

Help Please:

What is the best way to simulate some activity (start the file explorer every so often, then close it) in order to ensure that the Citrix session stays open and the sync process runs constantly?

Are there any ready scripts that can do this? Or are there any scripts that can also help automating the web-Citrix logon and the start of that particular sync tool?

Many thanks for any pointers, help, advice, scripts and other assistance!

Share this post

Link to post
Share on other sites

This is easily controled from the Citrix administrators. It can be configured. I would suggest to contact them.

Share this post

Link to post
Share on other sites

Here are a few functions you should look at.

_Timer_GetIdleTime() ; test idle time in a loop
_MouseMove() ; Move mouse if idle time close to your timeout
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post

Link to post
Share on other sites

Juvigi - the Citrix admins say this is not configurable on 'per iser' basis and therefore a re reluctant to change the timeout policy for everyone, especially that they are a commercial provider that the team in question is a client of.

JohnOn - thanks for the pointers - is the IE script that comes with AutoIT suitable to address my issues?

Share this post

Link to post
Share on other sites

It may be not configurable per user , but i am pretty sure it is configurable per group. So put all needed users to a group and configure.

It seems they are just not motivated enough to do it. Citrix admins are screwing with the good idea of Citrix now a days.

Are you using activeX web plugin for citrix or some other method?

Share this post

Link to post
Share on other sites

Using ActiveX.

Had many problems with _IECreate in W7 & IE9 ... Basically, if I create the IE session from the script, the security settings are all screwed up and although I can script the authentication successfully ;), the browser next asks again to download and install the ActiveX component. After doing so it recognises it already has it, but does not continue on. IEn sux! :)

The workaround was to 'manually' start IE and sent it to the secure logon site and then carry on with the script. Here:

#include <IE.au3>
$sMyApp = "My Test App"
$sUserName = "TESTER"
$sPass = "BIG_SECRET"
;Send("IExplore https://MY.CITRIX.PROVIDER.COM{Enter}")
;Sleep(5000) ; you have to - it could be slow
$oIE = _IECreate($sUrl, 1) ; note the 1 - it HAS to bethere inorder for the session to attach to the existing one created above
_IELoadWait ($oIE)
$oForm = _IEFormGetObjByName ($oIE, "loginForm")
$oText = _IEFormElementGetObjByName ($oForm, "login")
_IEFormElementSetValue ($oText, $sUserName)
$oText2 = _IEFormElementGetObjByName ($oForm, "passwd")
_IEFormElementSetValue ($oText2, $sPass)
_IEFormSubmit ($oForm,1)
_IELoadWait ($oIE)
$oLinks = _IELinkGetCollection($oIE)
_IELinkClickByText ($oIE, $sMyApp)

Of course, the links are Javascript and are not recognized by the _IELinkClickByText function. :graduated:


OK. Resolved.

1. Citrix and 64b IExplorer don't like each other. Further, if the au3 script is compiled in 64 bit it would start the IE64 and the security and compatibility go through the window. So compile in 32bit and launch 32bit IExplorer.

2. Links with space: My Link will appear as My%20Link and therefore care should be taken when searching for and comparing strings in link labels or names.

Edited by Metaspace

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...