Jump to content

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


Bregan
 Share

Recommended Posts

; 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
Link to comment
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
 Share

  • Recently Browsing   0 members

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