Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Read registry error (no tips)

by tye (Sage)
on Oct 30, 2012 at 02:20 UTC ( #1001444=note: print w/replies, xml ) Need Help??

in reply to Read registry error

Windows 7 doesn't come with Tips. Below I picked a different Registry key that I find often fills up with simple text data and also only asked for 'read' access:

use Win32::TieRegistry( Delimiter => '/' ); sub isExist{ my $tips= $Registry->Open( "HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/ +Run/", { Access => 'KEY_READ' }, ) or die "Can't find the 'Run' key: $^E\n"; foreach( keys %$tips ) { print "$_: ", $tips->{$_}, "\n"; } } isExist();

It works for me on Windows 7. But it wouldn't work if you don't even have 'read' access to that part of the Registry (seems unlikely). And it will report nothing if you don't have any "Run" entries (I've never been so lucky).

- tye        

Replies are listed 'Best First'.
Re^2: Read registry error (no tips)
by anaconda_wly (Scribe) on Oct 31, 2012 at 08:28 UTC
    Your way is OK for me. Thanks!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001444]
[Corion]: Meh, I found another Amazon "used" scam reseller... If a product sells for "almost new" at half the price, it's a scam, most likely...
[ambrus]: Corion: that's not true. Actually for Christmas and Thanksgiving, a lot of people buy electronics such as cameras as present, then many of them figure out they don't need it,

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (15)
As of 2017-11-21 14:57 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (304 votes). Check out past polls.