From: "LANDSMAN, Sean , GBM" Date: 2007-10-03T23:19:21+09:00 Subject: Re: Can't get example to work.... ------_=_NextPart_001_01C805C8.4E945080 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I've=20found=20(with=20most=20of=20the=20win32=20stuff)=20that=20a=20reboo= t=20often=20fixes=20this -=20I=20know=20it=20sounds=20cliched,=20but=20I've=20had=20similar=20error= s=20before=20and=20a reboot=20did=20the=20trick... Sean -----Original=20Message----- From:=20Jason=20Roelofs=20[=20mailto:jameskilton@gmail.com =20] Sent:=2003=20October=202007=2015:10 To:=20ruby-talk@ruby-lang.org Subject:=20Re:=20Can't=20get=20example=20to=20work.... You=20seem=20to=20be=20missing=20an=20"end",=20but=20I'll=20assume=20that'= s=20a=20copy/paste error. The=20code=20works=20for=20me,=20Ruby=201.8.6=20(OneClickInstaller). As=20a=20style=20note,=20require=20lines=20shouldn't=20have=20the=20".rb"=20= in=20them,=20so=20do: require=20"win32/registry" Jason On=2010/3/07,=20Brad=20=20wrote: > >=20Hello, > >=20I=20must=20be=20doing=20something=20wrong=20but=20I=20don't=20know=20w= hat.=20=20I'm=20trying=20to >=20use=20this=20example=20to=20learn=20more=20about=20the=20Win32API::Reg= istry=20library. > >=20require=20'win32/registry.rb' > >=20$VERBOSE=20=3D=20nil > >=20appList=20=3D=20[] > >=20Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Microsoft\Windows >=20\CurrentVersion\Uninstall')=20do=20|root| > >=20root.each_key=20do=20|k| >=20=20=20=20=20=20=20=20=20Win32::Registry::HKEY_LOCAL_MACHINE.open(root.= keyname=20+ >=20"\\#{k[0]}") >=20do=20|key| >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20key.each=20do=20|i| >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= if=20i[0]=20=3D=3D=20"DisplayName" >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20appList.push(i[2]) >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= end >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20end >=20=20=20=20=20=20=20=20=20end >=20end > >=20When=20I=20run=20it=20I=20get:=20uninitialized=20constant=20Win32> > >=20How=20do=20I=20fix=20this? > >=20Thank=20you. > >=20Brad > > > **************************************************************************= ********* The=20Royal=20Bank=20of=20Scotland=20plc.=20Registered=20in=20Scotland=20N= o=2090312.=20Registered=20Office:=2036=20St=20Andrew=20Square,=20Edinburgh= =20EH2=202YB.=20 Authorised=20and=20regulated=20by=20the=20Financial=20Services=20Authority= =20 =20 This=20e-mail=20message=20is=20confidential=20and=20for=20use=20by=20the=20= addressee=20only.=20If=20the=20message=20is=20received=20by=20anyone=20oth= er=20 than=20the=20addressee,=20please=20return=20the=20message=20to=20the=20sen= der=20 by=20replying=20to=20it=20and=20then=20delete=20the=20message=20from=20you= r=20 computer.=20Internet=20e-mails=20are=20not=20necessarily=20secure.=20The=20= Royal=20Bank=20of=20Scotland=20plc=20does=20not=20accept=20responsibility=20= for=20 changes=20made=20to=20this=20message=20after=20it=20was=20sent.=20 Whilst=20all=20reasonable=20care=20has=20been=20taken=20to=20avoid=20the=20= transmission=20of=20viruses,=20it=20is=20the=20responsibility=20of=20the=20= recipient=20to=20 ensure=20that=20the=20onward=20transmission,=20opening=20or=20use=20of=20t= his=20 message=20and=20any=20attachments=20will=20not=20adversely=20affect=20its=20= systems=20or=20data.=20No=20responsibility=20is=20accepted=20by=20The=20 Royal=20Bank=20of=20Scotland=20plc=20in=20this=20regard=20and=20the=20reci= pient=20should=20carry=20 out=20such=20virus=20and=20other=20checks=20as=20it=20considers=20appropri= ate.=20 Visit=20our=20websites=20at:=20 www.rbs.com www.rbs.com/gbm www.rbsgc.com **************************************************************************= ********* ______________________________________________________________________ This=20email=20has=20been=20scanned=20by=20the=20MessageLabs=20Email=20Sec= urity=20System. For=20more=20information=20please=20visit=20http://www.messagelabs.com/ema= il=20 ______________________________________________________________________ ------_=_NextPart_001_01C805C8.4E945080--