getmarci Posted July 18, 2012 Posted July 18, 2012 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()
JohnOne Posted July 18, 2012 Posted July 18, 2012 Hi, Your problem is not very clear to me, what is it exactly? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Moderators JLogan3o13 Posted July 18, 2012 Moderators Posted July 18, 2012 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. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
getmarci Posted July 18, 2012 Author Posted July 18, 2012 I will look into the RunAs() command using silent mode. Will follow up soon thank you for the insight JLogan.
Moderators JLogan3o13 Posted July 18, 2012 Moderators Posted July 18, 2012 Glad to be of service. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now