Sign in to follow this  
Followers 0
getmarci

Waiting for Control in same named Window

5 posts in this topic

Hello,

I am new to this AutoIt but find it very useful so far. I am currently automating an install process for our clients. I have successfully automated the entire process I need for Win XP. However the script is not working on a Win 7 64bit OS. I have changed the file paths to accomadate the 64bit OS. Thing is the window name is the same through the entire installation. I am using the "WinWaitActive" command after the installation finishes to enable an automated pressing of the enter key to get to the last, most important, window which is where I enter the username and password and check a box for remembering the credentials. My Question:What is the best way to get the desired outcome? Any tips or help is very appreciated. Here is my current script,"I would like to integrate using more control functions rather than just sending key strokes." Thanks in advance.

Global $cName = @ComputerName
$sPW = "xyz"
$uName = @UserName
$sFile = "C:\Program Files\Citrix\ICA Client\pnagent.exe"
$sLink = "C:\Documents and Settings\All Users\Desktop\Name on Desktop"
$sIcon = "C:\Documents and Settings\"&$uName&"\Local Settings\Application Data\Program\PNAgent\Icon Cache\7c0c3e4-56c1d1c-e52cfbce.ico"
$sAurg = '/xxx: (2) /QLaunch "xx_x_xx:Production Remote"'

MsgBox(0, "Title"," This will install Bla Bla," & @CRLF & "All windows will now be minimized for installation.")
WinMinimizeAll()
Run("CRE.exe /SERVER_LOCATION=https://xxx.xx/xx/xxx.xml")
WinWaitActive("same name window", "Installation completed successfully.")
Send("{ENTER}")
Sleep(2000)
Send ("domain prefix\"& $uName)
Send("{TAB}")
Send ("$pPW")
Send("{TAB}")
Send("{+}")
Send("{TAB}")
Send("{ENTER}")
Sleep(2000)
FileCreateShortcut($sFile,$sLink,Default,$sAurg,Default,$sIcon)
Sleep(1000)
MsgBox(0, "Title", @tab & " Installation complete." & @CRLF & "text")
WinMinimizeAllUndo()

Share this post


Link to post
Share on other sites



Hi, getmarci. It appears you are installing the Citrix agent. Have you looked into doing a silent install? Then you would not have to bother with trying to automate the button clicks. You can run the executable with the /silent switch as well as specifying your server. If it is a matter of entering your credentials, look into doing a RunAs() from the help file.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

I will look into the RunAs() command using silent mode. Will follow up soon thank you for the insight JLogan.

Share this post


Link to post
Share on other sites

Glad to be of service. :)


√-1 2^3 ∑ π, and it was delicious!

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
Sign in to follow this  
Followers 0