From: Rodrigo Bermejo Date: 2009-01-21T00:10:59+09:00 Subject: Re: Is it possible to install exe via ruby code ? jazzez ravi wrote: > Sorry for the wrong code in previous post > > working code: > > require 'watir' > ie=Watir::IE.new > ie.goto("file:///c:/test.exe") Ill share with you one of my Top Secret scripts. This will boost your productivity !!! What you need is there ..just adapt it to your needs. #| Pajarito de Homero /Homer Simposon's desktop bird V 1.0 - Ruby implementation #| #| Ejemplos: #| #| send_key_until_is_dead("Messenger Service") #| send_key_until_is_dead("Atari - Olimpic Games, 100 meters","a") #| #Inspired by Homer Simposon's desktop bird def homers_bird(dialog_name,key="{enter}") require 'win32ole' wsh = WIN32OLE.new('WScript.Shell') puts "Let's remember our old Atari games..!" puts "We'll kill <#{dialog_name}> ...." while wsh.AppActivate(dialog_name) wsh.SendKeys("{enter}") sleep 0.1 puts "Shoot !" end puts "You win !!!!" end `c:\\test.exe` send_key_until_is_dead("Installing") -- Posted via http://www.ruby-forum.com/.