From: Shashank Date Date: 2004-05-10T12:43:53+09:00 Subject: Re: Ruby Installer for Windows: use of Win32OLE bug causes crash "Jos Backus" wrote in message > In the attached file, which works in its current form on 2K3 I was able to run it on Win XP without a problem. Incidently I was also able to run your original program with minor modifications (see line 13 and 94 thru 97 of the attached ...). But it failed when I uncommented lines 94 and 97 ** AND ** installed the flash disk so that there were two logical drives. > I was able to trigger the problem arbitrarily by extending some of the string > constants beyond a certain length or removing expression terms (e.g. 1 * 1 -> > 1) in addition to changing the vertical whitespace (horizontal whitespace > seemed to have no influence). I saw the line issue at line 74 in the attached > file, and the first problem occurred when I tried adding an "align" => "right" > argument to a cgi.td call. I will give that a try ... > It sure would be nice to hear the win32ole author pipe up. At this point it does not seem like a win32ole issue since the following snippet works (at least on Win XP and ruby-1.8.1-rc13): #--------------------------------------------- require 'win32ole' host = "localhost" wmi = WIN32OLE.connect("winmgmts://#{host}/root/cimv2") disks = wmi.ExecQuery("Select * from Win32_LogicalDisk") p disks disks.each do |disk| next if disk.Size.nil? p disk.DeviceID, disk.Size, disk.FreeSpace end #---------------------------------------------