Tie::Registry
- From: tim.wolak@xxxxxxxxx (Tim Wolak)
- Date: Tue, 30 Aug 2005 09:47:22 -0500
Guys thanks for the help yesterday. I have one more question, can someone
have a look at my script and tell me why I'm not getting the value of the
key? The prints are just to prove to me that its working...
Thanks,
Tim
use strict;
use warnings;
use Win32::TieRegistry (Delimiter => '/');
my $path = "Software/Microsoft/Windows/CurrentVersion/Run";
my $host = "chill0031";
my $virval;
my $virusKey = $Registry->{"//$host/HKEY_LOCAL_MACHINE/$path"};
foreach my $entry(sort keys %{$virusKey}){
foreach ($entry) {
if ($entry =~ /haha/i){
print "Found virus entry!!!\n";
}
if ($entry !~ /haha/i){
print "No virus entry found.\n"
}
my $virval = $virusKey->GetValue($entry);
if ($virval =~ /haha/i){
print "I've finally found you!!!!\n";
}
print "$entry =>".$virusKey->{$entry};
print "\n";
}
}
- Prev by Date: RE: encrypt the password stored in a file
- Next by Date: Programmatically Creating MSAccess Databases?
- Previous by thread: Time Ranges
- Next by thread: Escaping with tr
- Index(es):