Sign in to follow this  
Followers 0
Bregan

what am I missing? (runas, winwait, winwaitactive)

2 posts in this topic

#1 ·  Posted (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 by Bregan

Share this post


Link to post
Share on other sites



found my problems... I removed the , 25 and it worked.

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