in reply to problem with spaces in path to registry key

The following works just fine on a Windows XP machine. The spaces are not an issue. I am running this as an administrator from a command line. Check out the security permissions on the registry keys that you are wanting to read. This is even more important if you are using the code from a web server.

#! /usr/bin/perl -w use strict; use warnings; my $Registry; use Win32::TieRegistry 0.20 ( TiedRef => \$Registry, Delimiter => "/", ArrayValues=>1, qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ KEY_REA +D KEY_WRITE KEY_ALL_ACCESS ), ); my $winkey= $Registry->{"CUser/Software/Microsoft/Internet Account Man +ager/"}; print keys(%$winkey);

Replies are listed 'Best First'.
Re^2: problem with spaces in path to registry key (or die)
by tye (Sage) on Jun 25, 2004 at 15:24 UTC

    If you had included

    or die "Can't open InetAcctMgr: $^E";

    then rut might get told why the open is failing rather than you trying to guess. (:

    - tye