Jump to content

Recommended Posts

Posted

Hello,

I have been playing around this script. The whole purpose of the script is to launch the citrix .ica file, type in some login credentials and show a tracking board forever. I want the script to keep looking for the process "wfica32.exe" to be running, if not, reboot the device. I placed this script in the startup folder of the computer so when it comes back up it runs again.

For this I have specified near the end of the script to look for wfica32.exe using While ProcesExists and I have played with the time after the sleep function.

If I run the script it works, meaning if I go to task manager and kill wfica32.exe the device indeed reboots. However if I run the script and I leave the computer running for a day (or a long time say 3- 4 hours) and then come back to it, I see the desktop icons (undesired) with the autoit icon in the taskbar and the wfica32.exe NOT RUNNING in the task manager. Even if I try to run the wfica32.exe process manually and then close it (thinking it would trigger the autoit script standing by in the taskbar) it would reboot the unit after I kill the mentioned process, but it still does not.

I know with ProcessExists The process is polled approximately every 250 milliseconds but in my case it is not working. Please help and here is the script:

Run("c:program filescitrixica clientwfica32.exe c:firstnettrackingFirstnetTrackingGreaseboardP290.ICA")
WinWaitActive("HNAM Logon - Remote")
Sleep(7000)
Send("xxxxxxx")
Send("{TAB}")
Send("xxxxxxx")
Send("{ENTER}")
Sleep(9000)
WinWaitActive("FirstNet Organizer for FIRSTNET, PLA RX - Remote")
Send("!ll{DOWN}B")
While ProcessExists("wfica32.exe")
      Sleep(10000)
   WEnd
Shutdown(2)

Thank you.

Posted (edited)

I'll stab at it...           (edit: because I cant test it...)

If Process exists is the only problem you are having, try this:

Run("c:\program files\citrix\ica client\wfica32.exe c:\firstnettracking\FirstnetTrackingGreaseboardP290.ICA")
WinWaitActive("HNAM Logon - \\Remote")
Sleep(7000)
Send("xxxxxxx")
Send("{TAB}")
Send("xxxxxxx")
Send("{ENTER}")
Sleep(9000)
WinWaitActive("FirstNet Organizer for FIRSTNET, PLA RX - \\Remote")
Send("!")
Send("ll")
Send("{DOWN}")
Send("B")

If ProcessExists("wfica32.exe") Then
    While 1
        Sleep(100);idle around
    WEnd

Else
    MsgBox(0, "", "No Window Here", 2)

EndIf
Shutdown(2)
Edited by billo

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
  • Recently Browsing   0 members

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