Bregan Posted September 17, 2009 Share Posted September 17, 2009 (edited) ; Fill in the username and password appropriate for your system. Local $sUserName = "username" Local $sPassword = "pass" Local $sDomain = "domain" Local $sProgram1 = "msiexec.exe /x {B2AE44CB-2AAB-4C08-A54B-D264BD604DA8}" Local $sProgram2 = "msiexec.exe /i \\server\share\XenAppHosted.msi" ;Close existing processes ProcessClose ( "pnamain.exe" ) ProcessClose ( "wfica32.exe" ) ProcessClose ( "CdfSvc.exe" ) ProcessClose ( "ssonsvr.exe" ) ProcessClose ( "wfcrun32.exe" ) ProcessClose ( "pn.exe" ) ProcessClose ( "msiexec.exe" ) ProcessClose ( "pnagent.exe" ) ; Run program as the other user. RunAs ($sUserName, $sDomain, $sPassword, 0, $sProgram1) WinWait ( "Windows Installer", 25 ) Send ( "y" ) Sleep ( 100000 ) RunAsWait($sUserName, $sDomain, $sPassword, 0, $sProgram2) I'm realize the runaswait would start immediately after clicking y, but I'm not able to get AutoIt to recognize the Windows Installer window and send the y key. I've used the Window Info tool and confirmed the window's name. Any ideas? Edited September 17, 2009 by Bregan Link to comment Share on other sites More sharing options...
Bregan Posted September 17, 2009 Author Share Posted September 17, 2009 found my problems... I removed the , 25 and it worked. Link to comment Share on other sites More sharing options...
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