> Hi all
>       I have a utility I wrote using ActivePerl. It is used to install 
> applications and hotfixes on Windows servers. I am trying to modify this to 
> work 
> with the 64bit version of Windows 2003. The problem is that due to the 
> registry 
> re-direction that 64it uses to maintain 32bit compatibility, my script is not 
> reading the registry keys properly.
> Here is a sample of my script. the CHKPATCH subroutine is used to test for 
> the 
> existence of a patch
> e.g to determine if KB896424 is installed I simply call CHKPATCH("KB896424").
> On 64bit, this utility does not read the registry key listed below because 
> its 
> running in 32 bit mode 
> even though I can see the key when I run Regedit from the server.
> 
> use Win32::TieRegistry(Delimiter=>"/");
> .......
> sub CHKPATCH
> {
>     my $hotfix;
>     if($hotfix =$Registry->{"LMachine/SOFTWARE/Microsoft/Windows 
> NT/CurrentVersion/HotFix/$_[0]"})
>     {
>         return 1;
>     }
>     else
>     {
>       return 0;
>     } 
>     
> }
> 
> Sorry for Rambling on and on but if anyone has any ideas I would be most 
> appreciative 

What you're looking for is a key, so you need a trailing slash:

$Registry->{"LMachine/SOFTWARE/Microsoft/Windows 
 NT/CurrentVersion/HotFix/$_[0]/"}

I'm frankly surprised it ever worked.

--
Eric Amick
Columbia, MD

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to