Sign in to follow this  
Followers 0
Malizim

RunAs then ControlClick (Process in Admin user space)

1 post in this topic

Hi, looking for some help with calling ControlClick after opening a program using RunAs.

After a program has been opening with RunAs and run as Domain Admin, previous ControlClick commands that run when the app is in the current user space do not work. Does anyone know how you shift focus to call the ControlClick command in the Admin user space?

Example of script :

RunAs("Administrator","XXXXXX","XXXXXXXXXX",0,"C:\Program Files (x86)\Fortinet\FortiClient\FortiClient.exe")
Sleep(2000)
WinActivate("FortiClient Console","")
ControlClick("FortiClient Console","","Button90")
Sleep(2000)
WinActivate("Input Password","")
Send("XXXXXXXXX","")
Send("{ENTER}")
Sleep(2000)
WinActivate("FortiClient Console","")
WinClose("FortiClient Console")

Any help with this would be greatly appreciated.

Many thanks....

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