require 'win32ole'
ai = WIN32OLE.new("AutoItX3.Control")
ai.Run("CONTROL.EXE inetcpl.cpl,,0")
ai.WinWaitActive("Internet 属性","")
ai.ControlClick("Internet 属性","删除 Cookies(&I)...","Button6")
ai.WinWaitActive("删除 Cookies","")
ai.ControlClick("删除 Cookies","确定","Button1")
ai.ControlClick("Internet 属性","确定","Button15")
引自:http://www.cnblogs.com/zhangfei/archive/2011/03/29/1998576.html