A
ant_howell
Hi
I've been using the Win32::TieRegistry module to query the windows
registry and have so far managed to obtain some good results. However,
I appear to be having difficulty retrieving a registry data type such
as REG_DWORD or REG_SZ.
I've looked at the CPAN docs for TieRegistry and the extract below is
taken directly from the docs.
$swKey= $Registry->{"LMachine/Software/"};
$winKey= $swKey->{"Microsoft/Windows/CurrentVersion/"};
$userKey= $Registry->
{"CUser/Software/Microsoft/Windows/CurrentVersion/"};
$remoteKey= $Registry->{"//HostName/LMachine/"};
$progDir= $winKey->{"/ProgramFilesDir"}; # "C:\\Program Files"
$tip21= $winKey->{"Explorer/Tips//21"}; # Text of tip #21.
$winKey->ArrayValues(1);
( $devPath, $type )= $winKey->{"/DevicePath"};
# $devPath eq "%SystemRoot%\\inf"
# $type eq "REG_EXPAND_SZ" [if you have SetDualVar.pm installed]
# $type == REG_EXPAND_SZ() [if did C<use Win32::TieRegistry
qwREG_)>]
Now, I have SetDualVar installed, that is to say I installed it via ppm
but I don't get any value back for type and it is undefined. $devPath
returns an array reference.
I know I am missing something fundamental and its most likely to be
very simple but simple or not, I can't seem to determine the problem.
All I want to do is to be able to obtain a data type for a particular
registry key value.
Any help will be appreciated.
Regards
Ant H.
I've been using the Win32::TieRegistry module to query the windows
registry and have so far managed to obtain some good results. However,
I appear to be having difficulty retrieving a registry data type such
as REG_DWORD or REG_SZ.
I've looked at the CPAN docs for TieRegistry and the extract below is
taken directly from the docs.
$swKey= $Registry->{"LMachine/Software/"};
$winKey= $swKey->{"Microsoft/Windows/CurrentVersion/"};
$userKey= $Registry->
{"CUser/Software/Microsoft/Windows/CurrentVersion/"};
$remoteKey= $Registry->{"//HostName/LMachine/"};
$progDir= $winKey->{"/ProgramFilesDir"}; # "C:\\Program Files"
$tip21= $winKey->{"Explorer/Tips//21"}; # Text of tip #21.
$winKey->ArrayValues(1);
( $devPath, $type )= $winKey->{"/DevicePath"};
# $devPath eq "%SystemRoot%\\inf"
# $type eq "REG_EXPAND_SZ" [if you have SetDualVar.pm installed]
# $type == REG_EXPAND_SZ() [if did C<use Win32::TieRegistry
qwREG_)>]
Now, I have SetDualVar installed, that is to say I installed it via ppm
but I don't get any value back for type and it is undefined. $devPath
returns an array reference.
I know I am missing something fundamental and its most likely to be
very simple but simple or not, I can't seem to determine the problem.
All I want to do is to be able to obtain a data type for a particular
registry key value.
Any help will be appreciated.
Regards
Ant H.