Jump to content

Convert VBS to AUTOIT


Recommended Posts

Hello guys,

This is the VBS code that I use to open a Citrix application.

At present, my AutoIT script calls this VBS to open the application JMP.

I was wondering if there is any equivalent AUTOIT code for this.

Reasons: 1) It is better to call straight from AutoIT 2) Some of my client's computer donot have MDAC installed to run VBS.

CODE
Set objIco = CreateObject("Citrix.ICAClient")

'Set Browser Protocol

objIco.BrowserProtocol = "HTTPonTCP"

'Set Server locator

objIco.TCPBrowserAddress = "10.80.3.157"

objIco.HttpBrowserAddress= "10.80.3.157"

'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 = "JMP 6"

objIco.WinstationDriver = "ICA 3.0"

objIco.TransportDriver = "TCP/IP"

objIco.desiredcolor = 4

objIco.Address="JMP 6"

objico.InitialProgram="#JMP 6"

'objIco.AutoLogonAllowed= true

'Set credentials

objIco.Username = "John"

objIco.SetProp "Password","hellozaq"

objIco.Domain = "CHTAD"

'Specify application to launch

'objIco.Application = "Notepad"

'Connect!!

objIco.Connect()

Link to comment
Share on other sites

A quick untested conversion.

$objIco = ObjCreate("Citrix.ICAClient")

;Set Browser Protocol
$objIco.BrowserProtocol = "HTTPonTCP"

;Set Server locator
$objIco.TCPBrowserAddress = "10.80.3.157"
$objIco.HttpBrowserAddress= "10.80.3.157"

;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 = "JMP 6"
$objIco.WinstationDriver = "ICA 3.0"
$objIco.TransportDriver = "TCP/IP"
$objIco.desiredcolor = 4

$objIco.Address="JMP 6"
$objico.InitialProgram="#JMP 6"
;$objIco.AutoLogonAllowed= true

;Set credentials
$objIco.Username = "John"
$objIco.SetProp ("Password","hellozaq")
$objIco.Domain = "CHTAD"

;Specify application to launch
;$objIco.Application = "Notepad"

;Connect!!
$objIco.Connect()

:whistle:

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...