Jump to content
Trisha

How to navigate fron Xen Desktop to our Local System

Recommended Posts

Trisha

I tried (using AutoIt) to automate a scenario where i  have to open IE with specific URL on my extranet(Xen Desktop or Citrix ) ,from there i need to download  file and then through WinSCP; I  have to move that file to another location that can be access from my Local system using VMWare.

I did as far as the above step. Now i want to navigate from my extranet to my local desktop system. But i am not able to move  from there.Mouse click is also not working.Please find the below screenshot highlighted in YELLOW.

 

Extranet.JPG

Extranet2.JPG

Share this post


Link to post
Share on other sites
BigDaddyO

I'm assuming you are running your script from inside the citrix desktop?  if so, that drop down and home are not visible to the client itself.  you would have to have the autoIT script running on your local system to click those.

I have a few scripts that run between Citrix and local systems and I use an .ini file on a network share that is updated when the Citrix desktop script is finished so the local system script knows when to take over.

 


hmm... I guess I have to have a signature...

Share this post


Link to post
Share on other sites
Trisha

Yes, Inside citrix desktop I am running the script.can you share the script just for a hint.

Share this post


Link to post
Share on other sites
BigDaddyO

My Citrix scripts are rather complicated and use too much internal Company stuff to share but here is a quick overview.

Main app is run from local desktop
  Create/update an ini file on a network share to flip a flag to say it needs to run, and identify what to run.
  Launch a specific Published Desktop where I have login scripts enabled, 2 ways to do this.
    1.  Use _IECreate to access your Citrix site then _IE.. stuff to login, and click the one you want
    2.  Use registry to find the one you want and launch via command line.
  Loop, checking every xxx seconds until the .ini flag switches to finished.

Citrix desktop Startup Script  this was the hardest for me to get as it required some admin config to allow
  Read the .ini file on the network share
    if the flag is not set, then exit as this was started for a different reason.
    if the flag IS set then launch the app identfied in the .ini "this way I can use this 1 launcher for many other things"

The actual script
  Perform the actions you want, get any script specific settings needed from the .ini
  once finished, mark the the .ini as finished

Main App picks up again
  You can now, gather log files, or whatever else you need to do, like close or minimize Citrix.
 

 

 

Here is some code on how to launch a Citrix item.  Not sure if it will work in your environment as it was rather complicated to figure out.

#include <File.au3> ;Needed for the _PathSplit


;Get the Citrix MachineID
    $sMachineID = RegRead("HKEY_CURRENT_USER\Software\Citrix\Dazzle", "CurrentAccount")         ;CompanyID-123456  This is the pointer needed for other steps
    If @error Then
        MsgBox(0, "Citrix", "Unable to identify this machine Citrix ID")
        Exit
    EndIf

    $sAppID = "@@DesktopName v1 $MoreStuff"                                                     ;This is the @@ Name for the item we want which will be appended to the $sMachineID
    $sCitrixRegPath = "Software\Microsoft\Windows\CurrentVersion\Uninstall\"                    ;Each Citrix item will be in a sub folder \$sMachineID & $sAppID

;Piece stuff together to get the Launch string for the item we want to start
    $sLaunchString = RegRead("HKCU\" & $sCitrixRegPath & $sMachineID & $sAppID, "LaunchString") ;Get the full string to pass to the .exe to launch
    $sCitrixApp = RegRead("HKCU\" & $sCitrixRegPath & $sMachineID & $sAppID, "ShortcutTarget")  ;Get the location of the SelfService.exe that launches Citrix

;Split out the full path to the SelfService.exe to use as the Working Directory
    Local $sDrive, $sDir, $sFile, $sExt
    $aPath = _PathSplit($sCitrixApp, $sDrive, $sDir, $sFile, $sExt)
    $sCitrixDir = $aPath[1] & StringLeft($aPath[2], StringLen($aPath[2]) - 1)

;Launch the SelfService.exe with the command line options, and the working path, This will spawn a seperate item once fully loaded.
;Using ShellExecuteWait as once it's fully loaded, the initial process closes.
    $iPID = ShellExecuteWait($sCitrixApp, $sLaunchString, $sCitrixDir)
    ConsoleWrite("Launched the Citrix item" & @CRLF)

 


hmm... I guess I have to have a signature...

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

  • Similar Content

    • gahhon
      By gahhon
      #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\..\Downloads\ALlogo.ico #AutoIt3Wrapper_Compile_Both=y #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_HiDpi=y #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so /rm /pe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** I found out that a lot of sources provided by AutoIT members like what I am recently using is the Metro UDF.
      On top of it, it always written the Region of code and red color. Then it also assign some value into some variable.
      May I know, what are their use and what is the purpose of doing?
      If I remove them, will affect the application?
      Thanks
    • gahhon
      By gahhon
      I don't find any relevant topic via Google Search. Please kindly advise how to read and update data in Google SpreadSheet.
      Thanks a lot.
    • gahhon
      By gahhon
      While Not _Login() _Initial_Check() WEnd Func _Login() Local $FLAG_LOGIN = _Password_Check() If @error = 1 Then _Close_Application() ElseIf @error = 2 Then _Metro_MsgBox(0, "", $FLAG_LOGIN) Return False Else ; $FLAG_LOGIN return TRUE _Metro_MsgBox(0, "", "Access granted!") Return True EndIf EndFunc  I do have a question regarding the While Not Loop.
      According to the code I post above, While Not _Login() is similar to While _Login() = False right?
      Which mean when _Login() return False and it will execute the _Initial_Check() function, but somehow the logic is not right and I also don't understand why While Not _Login() loop is executed as expected.
      What I wanna achieve is when _Login() is not success, which mean return False then it continue loop the _Login() function until it return True
      When It return True only execute the _Initial_Check() function.
      Please kindly clarify. Thanks
    • gahhon
      By gahhon
      I would like to copy the entire folder with current directory @WorkingDir
      paste into either Program Files or Program Files (x86)
      Global Const $CUR_WA_FOLDER = @WorkingDir & "\Test Folder" Global Const $DIR_FOLDER = _ProgramFilesDir() _Initial_Check() Func _Initial_Check() If FileExists($DIR_FOLDER & "\Test Folder") = 0 Then Local $Decisions = _Metro_MsgBox(4, "", "Do you want to install Test Application?") If $Decisions = "Yes" Then DirCopy($CUR_WA_FOLDER, $DIR_FOLDER, 1) Else _Close_Application() EndIf EndIf EndFunc Func _ProgramFilesDir() Local $ProgramFilesDir Switch @OSArch Case "X32" $ProgramFilesDir = "Program Files" Case "X64" $ProgramFilesDir = "Program Files (x86)" EndSwitch Return @HomeDrive & "\" & $ProgramFilesDir EndFunc  
    • nooneclose
      By nooneclose
      Is it possible to use Autoit to find every Monday within a date range? An example would be I want to find every Monday between 1/9/19 through 4/9/19. Then Autoit would give me all the dates on which Monday lands between those two dates. 
      Sorry but I don't have any code so far. I was wondering if it was even possible. I read the help file and I didn't see a function that could do that. 
×