Yonatan of yonatan_avraham at hotmail.com humbly asked: > I'm trying to do some WMI stuff with Ruby. I found this > simple example somewhere. It works -- until the program > exists that is. > Then Windows pops up a "ruby.exe - Application Error" message > box due to inappropriate memory access. > > require 'win32ole' > > mgmt = WIN32OLE.connect('winmgmts:\\\\.') > mgmt.InstancesOf("win32_process").each{ |proc| > puts proc.name > } > `pause` > > Does anyone know how to solve the problem? I'm running "ruby 1.8.0 > (2003-08-04) [i386-mswin32]" on Windows 2000. I cannot solve it but I can compare it w mine. c:\family\ruby>ver Microsoft Windows XP [Version 5.1.2600] c:\family\ruby>ruby -wv a1.rb ruby 1.8.1 (2003-12-05) [i386-mswin32] a1.rb:4: warning: class variable ARGV of Object is overridden by WIN32OLE System Idle Process System smss.exe csrss.exe winlogon.exe services.exe lsass.exe svchost.exe svchost.exe svchost.exe svchost.exe spoolsv.exe cisvc.exe sscansvc.exe ntrtscan.exe snmp.exe tmlisten.exe winvnc.exe Fast.exe OfcDog.exe explorer.exe TaskSwitch.exe tfswctrl.exe VxTaskbarMgr.exe PccNTMon.exe jusched.exe ctfmon.exe EMEDTRAY.EXE getright.exe WinKey.exe wweb32.exe soffice.exe OUTLOOK.EXE svchost.exe opera.exe cidaemon.exe wisptis.exe cmd.exe wmiprvse.exe ruby.exe Now, I have a q to the cool win32ole maintainer: why the argv override? > Regards, > Yonatan kind regards -botp