If automatically clicking the close button on a dialog box is
all you need, there are various tools to deal with it, e.g.
ClickOff (freeware) and
PTFB Pro. The latter is payware, but you can find the last free version on 321download.com's
Page 29. If you're using a user account with UAC On, you may not get all features in the free ones, but PTFB Pro certainly works. Other programs can do this too, e.g.
PowerPro - PowerPro is free, but it's a whole way of life - or (I think)
Macro Express which is an excellent payware macro program.