use strict; use Win32::Setupsup qw(WaitForAnyWindow GetWindowProperties SendKeys SetFocus); my ($window); system (1, "setup.exe"); if (WaitForAnyWindow("windows name", \$window, 6000, 500)) { SetFocus ($window); sleep (2); SendKeys ($windows,'textvalue',1); sleep (1); SendKeys ($windows,'\\TAB\\',1); sleep (1); SendKeys ($windows,'\\RET\\',1); sleep (2); }