Skip Menu |

This queue is for tickets about the Win32-TieRegistry CPAN distribution.

Report information
The Basics
Id: 102385
Status: resolved
Priority: 0/
Queue: Win32-TieRegistry

People
Owner: Nobody in particular
Requestors: bruce [...] brucereed.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.29



Subject: 02_main tests fail, here is a fix
Date: Thu, 26 Feb 2015 15:09:04 -0500
To: bug-Win32-TieRegistry [...] rt.cpan.org
From: Bruce Reed <bruce [...] brucereed.com>
The 02_main tests fail in Win32::TieRegistry. This is caused by the key a security restriction in the registry. In the key being used - CUser/Software/Microsoft/Windows/CurrentVersion/Policies/Explorer//NoDriveTypeAutoRunthe Policies subkey is set to ReadOnly access, but the default access for TieRegistry is Read/Write access. If we add ":KEY_", to the imports, and reopen the key with KEY_READ access, then the subkey is read successfully, and the tests run OK. *my*$reg; *use* Win32::TieRegistry ( Delimiter *=>* "/", ArrayValues *=>* 1, TiedRef *=>* \$reg, ":KEY_", ":REG_", ); $reg *=* $reg*->Open*('', *{*Access *=>* KEY_READ*}* ); *my* $val *=* $reg*->{* "CUser/Software/Microsoft/Windows/CurrentVersion/" *.* "Policies/Explorer//NoDriveTypeAutoRun" *}*; ok( $val, 'Opened CU/SW/MS/Win/CV/Pol/Exp//NoDriveTypeAutoRun' ); is( REG_DWORD, $val*->*[1], 'Type is REG_DWORD' ); like( $val*->*[0], qr/^0x[\da-f]{8}$/i, 'Value matches expected' );
From: Bruce Reed
On Thu Feb 26 15:09:26 2015, bruce@brucereed.com wrote: Show quoted text
> This is caused by the key a security restriction in the registry.
Note that this bug does not occur in a window with Administrator privileges. In a non-admin window the registry must be opened ReadOnly.
Applied for version 0.29. -- Alexandr Ciornii, http://chorny.net