Launch an ICA Connection to a Published Application Using the ICA Client Object

Added by Citrix CDN , last edited by Citrix CDN on Nov 06, 2007  (view change)
Tags: 

Description

This script uses the ICA Client Object to launch an ICA connection to a published application, Notepad.

Information on programming and scripting using the ICA Client Object can be found in the ICA Client Object SDK:

ICA Client Object SDK version 7.0

ICA Client Object SDK version 10.0

Script Version

1.0

How to Use

You will need an ICA client version 8.0 or later.
Paste the script into Notepad and save as fileName .vbs. Double-click the file. You can also run the file from the command prompt with the following command:
Cscript filename .vbs

Code Snippet

Set objIco = CreateObject("Citrix.ICAClient")

'Set Browser Protocol
objIco.BrowserProtocol = "UDP"

'Set Server locator
objIco.TCPBrowserAddress = "192.168.16.78"

'Disable IPCLaunch
objIco.IPCLaunch = FALSE

'Set to launch, rather than embed session
objIco.Launch = TRUE

'Enable seamless
objIco.TWIMode = TRUE

'objIco.XmlAddressResolutionType = "IPv4-Port"
objIco.ConnectionEntry = "Notepad"
objIco.WinstationDriver = "ICA 3.0"
objIco.TransportDriver = "TCP/IP"

'Set credentials
objIco.Username = "tuser"
objIco.SetProp "Password","citrix"
'objIco.Domain = "iforum1"

'Specify application to launch
objIco.Application = "Notepad"

'Connect\!\!
objIco.Connect()

Disclaimer

These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.