Is it possible to make the Citrix ICA Client Object part of of ahk?
http://support.citrix.com/article/ctx114202
Thanks in advance.
Citrix Client Object
-
- Posts: 60
- Joined: 03 Oct 2013, 19:49
- Location: Seattle Area
- Contact:
Re: Citrix Client Object
It appears to be a simple Active-X Object, so you can probably just hit it with ComObjCreate. I'm doing some Citrix work as we speak, so I may take a look at it. I'll report back if I learn anything useful.
-
- Posts: 47
- Joined: 29 Jan 2014, 12:23
Re: Citrix Client Object
Thanks Wade, I am interested to see how you make out.
Doug
Doug
Re: Citrix Client Object
Here's a brief thing to get started. It took me forever to figure out this much . Good luck.
Code: Select all
If A_Is64bitOS
{
; Need the following Regkeys, if get access denied in Win7, create them manually using RegEdit
GUID := "{238F6F83-B8B4-11CF-8771-00A024541EE3}"
RegRead, test, HKCR, Wow6432Node\CLSID\%GUID%
IfEqual, ErrorLevel, 1, msgbox, % "0: " GetLastError()
else msgbox % test
RegWrite, REG_SZ, HKCR, Wow6432Node\CLSID\%GUID%, AppID, %GUID%
IfEqual, ErrorLevel, 1, msgbox, % "1: " GetLastError()
RegWrite, REG_SZ, HKCR, Wow6432Node\AppID\%GUID%, DllSurrogate, % ""
IfEqual, ErrorLevel, 1, msgbox, % "2: " GetLastError()
RegWrite, REG_SZ, HKLM, Software\Classes\AppID\%GUID%
IfEqual, ErrorLevel, 1, msgbox, % "3: " GetLastError()
RegWrite, REG_DWORD, HKLM, Software\Wow6432Node\Citrix\ICA Client\CCM, AllowSimulationAPI, 1
IfEqual, ErrorLevel, 1, msgbox, % "4: " GetLastError()
RegWrite, REG_DWORD, HKLM, Software\Wow6432Node\Citrix\ICA Client\CCM, AllowLiveMonitoring, 1
IfEqual, ErrorLevel, 1, msgbox, % "5: " GetLastError()
} else {
RegWrite, REG_DWORD, HKLM, Software\Citrix\ICA Client\CCM, AllowSimulationAPI, 1
IfEqual, ErrorLevel, 1, msgbox, % "6: " GetLastError()
RegWrite, REG_DWORD, HKLM, Software\Citrix\ICA Client\CCM, AllowLiveMonitoring, 1
IfEqual, ErrorLevel, 1, msgbox, % "7: " GetLastError()
}
citrix := ComObjCreate("Citrix.ICAClient")
SessionHandle := citrix.EnumerateCCMSessions()
numSessions := citrix.GetEnumNameCount(sessionHandle)
Sessionid := citrix.GetEnumNameByIndex(sessionHandle, 0)
Citrix.StartMonitoringCCMSession(sessionid,1)
APPSERVER := citrix.GetSessionString(0)
msgbox % sessionHandle " " numSessions " " APPSERVER
Citrix.StopMonitoringCCMSession(Sessionid)
Citrix.CloseEnumHandle(SessionHandle)
return
GetLastError(Error=0)
{
VarSetCapacity(ErrorString, 1024)
IfEqual, Error, 0, SetEnv, Error, %A_LastError%
if DllCall("FormatMessage"
, "UINT", 0x1000 ; FORMAT_MESSAGE_FROM_SYSTEM: The function should search the system message-table resource(s) for the requested message.
, "PTR", 0 ; A handle to the module that contains the message table to search.
, "UINT", Error
, "UINT", 0 ; Language-ID is automatically retreived
, "Str", ErrorString
, "UINT", 1024 ; Buffer-Length
, "STR", "") ; "str", "") ;An array of values that are used as insert values in the formatted message. (not used)
return ErrorString
}