GUI Scripting the Installer - Authentication

Hi Folks,

I try to Script (GUI Scripting) the Installer - it works fine, but I am not able to press the “OK” Button
on the Authentication Window

My Code so far:

set theAnswer to text returned of (display dialog "Bitte Systempasswort eingeben: " buttons {"OK"} default answer "" default button "OK")

activate application "Installer"
tell application "System Events"
	tell process "Installer"
		click button 5 of window 1
		delay 1
		click button 5 of window 1
		delay 1
		click button 6 of window 1
		delay 1
		keystroke theAnswer
		click button "OK" of window "Authenticate"
	end tell
end tell

Has anybody an idea how to reference the Authenticate window?

Thanks for your help and best regards,


Hi Stefan,

the window “Authenticate” belongs to the background application “SecurityAgent”
try this:

tell application "System Events" to tell window "Authenticate" of process "SecurityAgent"
	click button "OK" of group 2
end tell

Optionally you could use the command line installer.

man installer