Refresh Browser for IE Citrix Session

Download Template
So I've been working on a development project for a client, and doing all of the development remotely. The issue I've been having is with their Citrix environment, I've launched Citrix from an IE8 browser and after a period of 30 minutes or so the remote session will die and the Citrix session will be gone due to inactivity. If I were to stop in the middle of my development every 25-29 minutes and just do a simple refresh on the browser, then this behavior would stop. Now if you use this script, the script will do the refreshing for you but you must start your session using this script, doesn't apply to existing sessions, happy scripting! On Error Resume Next Set objExplorer = CreateObject("InternetExplorer.Application") objExplorer.Navigate "http://www.vpn.com/" objExplorer.Visible = 1 Wscript.Sleep 5000 Set objDoc = objExplorer.Document Do While True Wscript.Sleep 30000 objDoc.Location.Reload(True) If Err <> 0 Then Wscript.Quit End If Loop

m3crast
February 16, 2012



On Error Resume Next

Set objExplorer = CreateObject("%{Browser}%.Application")

objExplorer.Navigate "%{URLtoRefresh}%"   
objExplorer.Visible = 1

Wscript.Sleep %{PauseTimeMS}%

Set objDoc = objExplorer.Document

Do While True
    Wscript.Sleep %{PauseTimeMS}%
    objDoc.Location.Reload(True)
    If Err <> 0 Then
        Wscript.Quit
    End If
Loop

You must be logged in to comment.