Re: error while installing win32::Registry module

2010-03-31 Thread Alan Haggai Alavi
Hi,

> Can't locate Win32/Registry.pm in @INC (@INC contains:
> C:/strawberry/perl/lib C:
> /strawberry/perl/site/lib C:\strawberry\perl\vendor\lib .) at GETIP.pl line
> 1.
> BEGIN failed--compilation aborted at GETIP.pl line 1.

It means that perl is unable to find the module Win32::Registry. So,
you need to either install it or add it to @INC for perl to find it.
>From checking CPAN, I read that Win32::Registry
(http://search.cpan.org/perldoc?Win32::Registry) is now obsolete use
Win32::TieRegistry (http://search.cpan.org/perldoc?Win32::TieRegistry)
instead.

Regards,
Alan Haggai Alavi.

--
The difference makes the difference

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: error while installing win32::Registry module

2010-03-30 Thread Sisyphus


- Original Message - 
From: "Jyoti" 

To: 
Sent: Tuesday, March 30, 2010 5:50 PM
Subject: error while installing win32::Registry module



Dear All,
I was trying to run my script getip.pl . But when i run this script it
gives following error

C:\strawberry\perl\Test>perl GETIP.pl
Can't locate Win32/Registry.pm in @INC (@INC contains:
C:/strawberry/perl/lib C:
/strawberry/perl/site/lib C:\strawberry\perl\vendor\lib .) at GETIP.pl 
line

1.
BEGIN failed--compilation aborted at GETIP.pl line 1.

To resolve this error I downloaded module Win32-DriveInfo-0.06  from
cpan.org  and used following steps to install but again shows the same
problem.


Correct steps ... but wrong module :-)

You needed  to install Win32::Registry, not Win32::DriveInfo. You can grab 
the Win32::Registry source from 
http://search.cpan.org/~jdb/Win32-Registry-0.10/


Cheers,
Rob 



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: error while installing win32::Registry module

2010-03-30 Thread Shlomi Fish
Hi Jyoti!

Next time, please hit reply-to-all. You've sent a reply only to me. I'm CCing 
the list.

On Tuesday 30 Mar 2010 11:42:30 Jyoti wrote:
> hello shlomi,
> yes...but i'm not able to run script in which I use win32::Registry.
> 

Well, as opposed to some languages (BASIC/VB-Classic, Fortran, etc.) Perl is 
case-sensitive.

You need to do:

<<<
use Win32::Registry;

my $obj = Win32::Registry->new();
>>>

In the exact case.

Happy Spring Holidays.

Regards,

Shlomi Fish

-- 
-
Shlomi Fish   http://www.shlomifish.org/
Funny Anti-Terrorism Story - http://shlom.in/enemy

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: error while installing win32::Registry module

2010-03-30 Thread Shlomi Fish
Hi Jyoti,

On Tuesday 30 Mar 2010 09:50:39 Jyoti wrote:
> Dear All,
>  I was trying to run my script getip.pl . But when i run this script it
> gives following error
> 
> C:\strawberry\perl\Test>perl GETIP.pl
> Can't locate Win32/Registry.pm in @INC (@INC contains:
> C:/strawberry/perl/lib C:
> /strawberry/perl/site/lib C:\strawberry\perl\vendor\lib .) at GETIP.pl line
> 1.
> BEGIN failed--compilation aborted at GETIP.pl line 1.
> 
> To resolve this error I downloaded module Win32-DriveInfo-0.06  from
> cpan.org  and used following steps to install but again shows the same
> problem.
> 
> 
> C:\strawberry\perl>cd Win32-DriveInfo-0.06
> 
> C:\strawberry\perl\Win32-DriveInfo-0.06>perl Makefile.pl
> Writing Makefile for Win32::DriveInfo
> 
> C:\strawberry\perl\Win32-DriveInfo-0.06>dmake install
> cp DriveInfo.pm blib\lib\Win32\DriveInfo.pm
> Installing C:\strawberry\perl\site\lib\Win32\DriveInfo.pm
> Appending installation info to C:\strawberry\perl\lib/perllocal.pod
> 
> C:\strawberry\perl\Win32-DriveInfo-0.06>dmake test
> C:\strawberry\perl\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl
> 1..11
> ok 1
> ok 2
> ok 3
> ok 4
> ok 5
> ok 6
> ok 7
> ok 8
> ok 9
> ok 10
> Drive C: `dir' and module returned the same
> Drive D: `dir' and module returned the same
> Drive F: `dir' and module returned the same
> Drive G: `dir' and module returned the same
> ok 11

Is that everything you wanted to say? If so, it seems that everything was 
successful. Are you using Strawberry Perl or ActivePerl or something else?

Regards,

Shlomi Fish

-- 
-
Shlomi Fish   http://www.shlomifish.org/
Funny Anti-Terrorism Story - http://shlom.in/enemy

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




error while installing win32::Registry module

2010-03-29 Thread Jyoti
Dear All,
 I was trying to run my script getip.pl . But when i run this script it
gives following error

C:\strawberry\perl\Test>perl GETIP.pl
Can't locate Win32/Registry.pm in @INC (@INC contains:
C:/strawberry/perl/lib C:
/strawberry/perl/site/lib C:\strawberry\perl\vendor\lib .) at GETIP.pl line
1.
BEGIN failed--compilation aborted at GETIP.pl line 1.

To resolve this error I downloaded module Win32-DriveInfo-0.06  from
cpan.org  and used following steps to install but again shows the same
problem.


C:\strawberry\perl>cd Win32-DriveInfo-0.06

C:\strawberry\perl\Win32-DriveInfo-0.06>perl Makefile.pl
Writing Makefile for Win32::DriveInfo

C:\strawberry\perl\Win32-DriveInfo-0.06>dmake install
cp DriveInfo.pm blib\lib\Win32\DriveInfo.pm
Installing C:\strawberry\perl\site\lib\Win32\DriveInfo.pm
Appending installation info to C:\strawberry\perl\lib/perllocal.pod

C:\strawberry\perl\Win32-DriveInfo-0.06>dmake test
C:\strawberry\perl\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl
1..11
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
Drive C: `dir' and module returned the same
Drive D: `dir' and module returned the same
Drive F: `dir' and module returned the same
Drive G: `dir' and module returned the same
ok 11


Re: Win32 Registry

2003-12-22 Thread Bob X
$reg_obj->DeleteKey($sub_key_name);



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Win32 Registry

2003-12-21 Thread R. Joseph Newton
Tim Johnson wrote:

> Easy there.  Before we start using the 'V' word, lets just step back for a second.  
> First of all, there is absolutely nothing wrong with putting a program in the Run 
> key, and it is in fact a bad idea to tell people to categorically delete anything in 
> that key.  I would agree that viruses and other programs often use this key, and it 
> is a good idea to familiarize yourself with the legitimate contents of this key.  
> Creaing a service for any program that needs to run at startup is overkill, and 
> actually can be counterproductive, since the majority of non-OS programs should be 
> run in the user context instead of the system context, but this is really a 
> discussion for another forum.

I agree that I was overstating the case--slightly.  I was looking at the right subkey, 
but under the wrong key, HKEY_CURRENT_USER, when I said that.  When I looked at the 
actual key I cited, I did see four values.  One, the system-tray icon for my 
antivirus, is convenient.  Another, the Synchronization Manager, was something I 
specifically requested by turning on the offline files feature.  The other two were 
Iomega cats my zip drive drug in--imgicon.exe and another exe that seems to run and 
exit at startup.

None of these is at all indispensable, and I run some pretty heavy-duty productivity 
applications.  So while my statement may have involved a bit of hyperbole, I will 
basically stick with it.

> Now on to the actual question:
>
> I'm going to assume that the OP has already done his research for now and knows for 
> sure that he wants to delete the key in quesion, and avoid the standard lecture on 
> why you should be VERY SURE that you want to do this before you start deleting keys. 
>  The way you would actually do this would be via a line like this:
>
> my $result = delete $Registry->{'HKEY_LOCAL_MACHINE/SOFTWARE/Tim/MyKey/'};
>
> Of course, this only works if there are no subkeys, so you will have to work your 
> way back from the deepest key if there are subkeys.
>
> Also, I really recommend reading the documentation on the module.
>
> "Perldoc Win32::TieRegistry"

Sorry, Tim, but there is way more to it than that.  Have you ever tried to remove the 
vestiges of a failed install/uninstall, particularly on a large, multi-application 
suite.  The keys and values set are not at all so neatly placed.  They can be found 
all over the Registry.  If left in place, some of them can cause very persistent, 
subtle, and vexing problems.  There are legitimate purposes for many of these 
settings.  File types must be associated.  DLLs must be registered, etc.  Some though, 
seem to exist for no other purpose than to insinuate the software inextricably in the 
system.

I really don't think there is any way one could successfully code a Registry scour to 
clean out a bad uninstall until one has done it by hand.

Joseph



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Win32 Registry

2003-12-21 Thread Tim Johnson

Easy there.  Before we start using the 'V' word, lets just step back for a second.  
First of all, there is absolutely nothing wrong with putting a program in the Run key, 
and it is in fact a bad idea to tell people to categorically delete anything in that 
key.  I would agree that viruses and other programs often use this key, and it is a 
good idea to familiarize yourself with the legitimate contents of this key.  Creaing a 
service for any program that needs to run at startup is overkill, and actually can be 
counterproductive, since the majority of non-OS programs should be run in the user 
context instead of the system context, but this is really a discussion for another 
forum.

Now on to the actual question:

I'm going to assume that the OP has already done his research for now and knows for 
sure that he wants to delete the key in quesion, and avoid the standard lecture on why 
you should be VERY SURE that you want to do this before you start deleting keys.  The 
way you would actually do this would be via a line like this:

my $result = delete $Registry->{'HKEY_LOCAL_MACHINE/SOFTWARE/Tim/MyKey/'};

Of course, this only works if there are no subkeys, so you will have to work your way 
back from the deepest key if there are subkeys.

Also, I really recommend reading the documentation on the module.

"Perldoc Win32::TieRegistry"

-Original Message-
From: R. Joseph Newton [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 1:24 PM
To: Tim Johnson
Cc: Jeff Westman; perl_help
Subject: Re: Win32 Registry


Tim Johnson wrote:

> Win32::TieRegistry will do what you want.
>
> use Win32::TieRegistry (delimiter => '/');
> my $run = 
> $Registry->{'HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run'};
> $run->{'MyApp'} = "My Application";
>
> etc., etc.

That looks like a good example of the crap that we need to scour from our registries.  
Please
don't recommend virus-like program behaviors.  A well-managed Windows machine should 
have
nothing--zilch--nada--in this key.  

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: Win32 Registry

2003-12-20 Thread R. Joseph Newton
Tim Johnson wrote:

> Win32::TieRegistry will do what you want.
>
> use Win32::TieRegistry (delimiter => '/');
> my $run = 
> $Registry->{'HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run'};
> $run->{'MyApp'} = "My Application";
>
> etc., etc.

That looks like a good example of the crap that we need to scour from our registries.  
Please
don't recommend virus-like program behaviors.  A well-managed Windows machine should 
have
nothing--zilch--nada--in this key.  This is the spammers key.  Please recommend only 
deleting
all values from it.  Windows does provide other means to set up legitimate services 
that truly
need to start with the OS.

I'm sorry if this sounds harsh.  You see, my "day job" is maintaining, setting up--and
de-idiotizing--user-end, mostly Windows, machines.  The nastiest problems I see come 
when my
colleagues decide to download and install some new software, usually for music or video
channels, and find that their little cotton-candy app has taken over their 
workstation.  I
have to clean up the mess afterward, and often these apps don't want to cooperate.  
This
process has left me with a somewhat jaundiced view towards applications that try to 
push
themselves to the forefront.  If a user wants an application to run, he or she can
double-click a clearly labelled icon to get their desired functionality.

To the OP, I would say that this is a very ambitious undertaking.  Since unethical 
software
vendors can and will slime their keys into almost any part of the Registry, it really 
takes a
lot of scouring to hunt them down.  One place to start is by finding the references in
HKEY_CLASSES to any extensions the app has nabbed.  These are often associated with 
128-bit
GUIDs, shown in bracketed hex, by which other associations are made.  You have to 
trace the
GUIDs, any type names associated, etc., and you still can't be certain that you've 
gotten
everything.  You should also seek in HKEY_LOCAL_MACINE\SOFTWARE\VendorName\AppName\ to 
get the
more transparent keys that legitimate installers will use as a guide.

To do this programatically, you should first try doing it by hand, to better 
understand how
applications are insuated into the Registry.

If I have some time in the next couple days, I'll try to make a short list of the 
tracer
methods that might help.

Josep[h


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Win32 Registry

2003-12-20 Thread Jeff Westman
Tim Johnson <[EMAIL PROTECTED]> wrote:

> Win32::TieRegistry will do what you want.
>  
> use Win32::TieRegistry (delimiter => '/');
> my $run =
>
$Registry->{'HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run'};
> $run->{'MyApp'} = "My Application";
>  
> etc., etc.

Suppose I had some DATA values listed under a branch (ie, "VALUE").  How do I
delete those?  I'm a little bit paranoid running something I've never done and
hosing my registry.

Can you give me an example...

TIA

Jeff


 
>   -Original Message- 
>   From: Jeff Westman [mailto:[EMAIL PROTECTED] 
>   Sent: Fri 12/19/2003 10:12 PM 
>   To: perl_help 
>   Cc: 
>   Subject: Win32 Registry
>   
>   
> 
>   Hi,
>   
>   I need to access the Windows registry directly (not an exported 'reg'
> file).
>   I am not familiar with Win32::Registry::File. 
>   
>   Basically, I am trying to write a script that will do some 'cleanup' of
> known
>   'values' and 'data' strings that some uninstall applications neglect to
>   cleanup.
>   
>   Any examples on how to use this would be appreciated (or other
>   recommendations).
>   
>   TIA
>   
>   
>   -Jeff
>   
>   __
>   Do you Yahoo!?
>   New Yahoo! Photos - easier uploading and sharing.
>   http://photos.yahoo.com/
>   
>   --
>   To unsubscribe, e-mail: [EMAIL PROTECTED]
>   For additional commands, e-mail: [EMAIL PROTECTED]
>   <http://learn.perl.org/> <http://learn.perl.org/first-response>
>   
>   
>   
> 
> 


__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




RE: Win32 Registry

2003-12-20 Thread Tim Johnson
Win32::TieRegistry will do what you want.
 
use Win32::TieRegistry (delimiter => '/');
my $run = 
$Registry->{'HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run'};
$run->{'MyApp'} = "My Application";
 
etc., etc.

-Original Message- 
From: Jeff Westman [mailto:[EMAIL PROTECTED] 
Sent: Fri 12/19/2003 10:12 PM 
To: perl_help 
Cc: 
Subject: Win32 Registry



Hi,

I need to access the Windows registry directly (not an exported 'reg' file).
I am not familiar with Win32::Registry::File. 

Basically, I am trying to write a script that will do some 'cleanup' of known
'values' and 'data' strings that some uninstall applications neglect to
cleanup.

Any examples on how to use this would be appreciated (or other
recommendations).

TIA


-Jeff

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>






Win32 Registry

2003-12-19 Thread Jeff Westman
Hi,

I need to access the Windows registry directly (not an exported 'reg' file). 
I am not familiar with Win32::Registry::File.  

Basically, I am trying to write a script that will do some 'cleanup' of known
'values' and 'data' strings that some uninstall applications neglect to
cleanup.

Any examples on how to use this would be appreciated (or other
recommendations).

TIA


-Jeff

__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: Win32 registry

2003-08-18 Thread Jenda Krynicky
From: Saadat Saeed <[EMAIL PROTECTED]>
> I am new to scripting (in general) and am an
> administrator of win32 based systems. I am deciding
> between Perl & a number of other scripting
> technologies to standardise upon.
> 
> The only thing that'll convince me for now is the
> abiltity to read and modify registries of machines
> connected over the wan or Lan in the same domain or
> trusted domain. ANy easy way of doing it in perl and
> you have a new follower

If you have the ActivePerl distribution you have several different 
modules for Registry access installed already. Have a look at
    Win32::TieRegistry
Win32::Registry
Win32AIP::Registry

the perldoc program will give you info about those, just run
perldoc Win32::TieRegistry
on the Command Prompt. (Or find the module in the HTML docs)

You may want to have a look also at Win32::Registry2 at 
http://Jenda.Krynicky.cz/#Win32::Registry2 (This is gonna become the 
next version of Win32::Registry, but you may install it already.)

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Win32 registry

2003-08-15 Thread Saadat Saeed
Hello,

I am new to scripting (in general) and am an
administrator of win32 based systems. I am deciding
between Perl & a number of other scripting
technologies to standardise upon.

The only thing that'll convince me for now is the
abiltity to read and modify registries of machines
connected over the wan or Lan in the same domain or
trusted domain. ANy easy way of doing it in perl and
you have a new follower

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Win32 registry question

2002-07-12 Thread Jenda Krynicky

From: "Edouard Beaugard" <[EMAIL PROTECTED]>
> Does anyone have a script that will query a registry key on a remote
> PC? I'm doing some maintenance work this would really help a lot.
> 
> Thanks,
> Ed Beaugard

Assuming you installed my Win32::Registry2 patch :

use Win32::Registry;

$remoteHKLM = $HKLM->Connect( $server)
or die "Cannot connect $server : $^E\n";

print $remoteHKLM->Open('SOFTWARE\Microsoft\Internet Explorer')
->GetValue("Version");

The patch may be downloaded from 
http://Jenda.Krynicky.cz/#Win32::Registry2

HTH, Jenda
=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
--- me


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Win32 registry question

2002-07-12 Thread Timothy Johnson


Here's a littel tutorial I wrote for a friend of mine.  It shows the basics
of setting/reading keys.



-Original Message-
From: Edouard Beaugard [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 12, 2002 11:02 AM
To: [EMAIL PROTECTED]
Subject: Win32 registry question



Hello,

Anyone have a script that will query the registry for the value of a
particular key? I'm doing
some maintenance work and haven't been able to figure out the TieHash way
of accessing the registry.

Thanks,
Ed Beaugard




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



#
## ##
## Win32-TieRegistry_Tutorial v1.0.052302  ##
##written by Tim Johnson   ##
##  05-23-2002 ##
## ##
#

#Welcome to the tutorial.  This should give you a good
#enough idea of how to manipulate the Windows registry
#to perform most tasks.  Let's get started by declaring
#our modules.

use strict; #always a good idea in general
use Win32::TieRegistry(Delimiter => "/");#So that we can use forward slashes

#A new Win32::TieRegistry object is automatically created
#called $Registry.  $Registry is a hash reference[1].  Each
#key of the hash it points to is either another reference to 
#another hash or a scalar which corresponds to a"value"(to
#use the registry term).  This will make a little more
#sense after you've used it a while.

#Now that we've created the registry hashes, let's try
#working with what we've created.  We can create a new
#object[1] that points to a specific part of the registry
#or we can just shoot for the part we want to change.
#For the purposes of making this easier to read, I'll make
#a new object.

my $IEKey = $Registry->{'HKEY_CURRENT_USER/Software/Microsoft/Internet 
Explorer/Main/'};

#The arrow operator, the way it is used in this example, denotes that we are
#working with a hash reference, and not a key of %Registry.  We now have
#an object that represents the exact key we want to work with.  Now let's
#change the 'Start Page' value.  

$IEKey->{'Start Page'} = "http://www.perl.org";;

#Viola!  Your start page has changed.  Now let's try creating a new key.

$Registry->{'HKEY_CURRENT_USER/Software/Perl Beginners/'} = {};

#We've created a new, empty key.  Now let's set the default value.

$Registry->{'HKEY_CURRENT_USER/Software/Perl Beginners//'} = "Camel";

#Notice that since the default value does not have a name, there
#are TWO slashes at the end of the key.  With Win32::TieRegistry,
#If you want to resolve ambiguities about whether the item at the end
#is a registry key or registry value, you can (a)add a slash to the end
#to denote a key, or (b)add two slashes before the value, so our
#double-slash denotes a value with a zero-length name[2].

#For our next trick, lets create a new object for simplicity, and add
#a value to our new key.

my $BeginnerKey = $Registry->{'HKEY_CURRENT_USER/Software/Perl Beginners/'};
$BeginnerKey->{'TIMTOWTDI'} = "There Is More Than One Way To Do It";

#And for a variation on a theme, lets try a REG_DWORD value.  This changes
#things a little because it is a binary value.  We will have to specify
#both the value and the type like so, to avoid accidentally creating
#a string value.

$BeginnerKey->{'MyDWORD'} = ['0x0001',REG_DWORD];

#Finally, let's look at reading values.  We are still treating each
#key as a hash reference, so we will have to dereference our hash to
#get the value.

my $KeyValue = $BeginnerKey->{'TIMTOWTDI'};
print "My new variable's value is:  $KeyValue\n\n";

#That looks pretty clean, but what about getting all of the keys?
#If we dereference the hash, we can use the keys() function.

my @KeyArray = keys %{$BeginnerKey};
print "Here are the values in my registry key:\n";
foreach(@KeyArray){
if($_ eq '/'){
print "   /(default)\n";
}else{
print "   $_\n";
}
}

#There are more things you can do with this module, but I think that
#covers the basics.  If you have any questions or comments, please post
#them back to the list and I'll try to answer them if I can.

#[1]Technically $Registry is a Win32::TieRegistry object.  It is a tied
#   hash that allows you to manipulate the hash and automagically
#   cause changes to be made to the registry at the same time as changes
#   are made to the hash.  Just think of it as a hash reference if that
#   seems confusing.
#[2]Win32::TieRegistry will cut you a little slack w

Win32 registry question

2002-07-12 Thread Edouard Beaugard


Hello,

Anyone have a script that will query the registry for the value of a
particular key? I'm doing
some maintenance work and haven't been able to figure out the TieHash way
of accessing the registry.

Thanks,
Ed Beaugard




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Win32 registry question

2002-07-12 Thread Edouard Beaugard


Hello,

Does anyone have a script that will query a registry key on a remote PC?
I'm doing some maintenance work this would really help a lot.

Thanks,
Ed Beaugard





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]