Joel,

Thank you. Not only did this explain what was happening it gave a solution 
without anything being added.
Trying to create a script to gather the registry information for a program that 
happens to be 32 bit and ships with a basic Perl for a Perl API, I figured this 
would be a great way to remove human error, unfortunately I did not expect the 
caveat you explained and resolved quite nicely.

Thank you again.

And thanks to everyone whom replied. The options of extra items was something I 
was going to bring up and look into due to the need to verify our registry 
section correctly.

Sincerely,
Josh Perlmutter
CA SiteMinder Technical Support Engineer
Contacting support...
...By Phone: 1-800-CALL CAI (225-5224)
...Via the Web: https://support.ca.com

Any questions or concerns, please feel free to contact my manager Bill Miller 
Manager, CA Technologies Support
(508) 628-8858
william.mill...@ca.com<mailto:william.mill...@ca.com>

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and contain information that may be privileged and 
confidential.  Any unauthorized review, use, disclosure or distribution is 
prohibited.  If you are not the intended recipient of this e-mail, please 
delete this e-mail and any files transmitted with it and notify the sender 
immediately.

From: activeperl-boun...@listserv.activestate.com 
[mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Joel Friedman
Sent: Saturday, April 13, 2013 10:02 PM
To: Perlmutter, Joshua B; activeperl@listserv.ActiveState.com
Subject: RE: "fake" hive in the registry on 64 bit windows

I'm not certain if this is your problem, but if you are running an x86 copy of 
Perl on an x64 system, and you are using backticks for execution, Windows 
filesystem redirection will kick in and actually execute 
%windir%\SysWOW64\reg.exe.  The x86 version of reg.exe is different, and may 
(purposefully) not have access to the 64bit registry.

Try executing $ENV{SYSTEMROOT} . '\\SysNative\\reg.exe' instead.  You won't see 
the SysNative directory from the standard (x64) command prompt, but it will 
exist from within an x86 shell with filesystem redirection.

--Joel

From: activeperl-boun...@listserv.activestate.com 
[mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Perlmutter, 
Joshua B
Sent: Thursday, April 11, 2013 12:39 PM
To: activeperl@listserv.ActiveState.com
Subject: "fake" hive in the registry on 64 bit windows

Dear Perl Gurus,

I have an issue with reading registries in Perl. I know there is a ppm for 
this, but requirements prohibit the use of this package. I am instead using 
"reg"
I have posted on the Active State Forums, yet they seem infrequently used., so 
I am reposting here.

Originally posted to: http://community.activestate.com/node/9693


In the attached sample script I get an extra copy of the 32 bit hive in the 64 
bit section. This is even after creating a fake 64 bit section that has one key 
called "isThisReal" with value "Do You See Me?" as a Reg_SZ

Instead I get the attached output.
Any help on figuring out how to get the real 64 bit hive section would be 
GREATLY appreciated.

There should be an attachment of a zip file containing the test script and its 
output.

(Notice: This is a REGISTRY QUERYING SCRIPT. if you are uncomfortable touching 
your windows registry, please do not execute.)

What i tried for testing was to run the commands OUTSIDE of perl in the command 
shell and i get the correct output there.

This is being developed to gather information on server machines so i've been 
using Windows 2008 R2.

I'm sure it is me missing something as this is not something i would expect to 
be uncommon, so i apologize in advance if this seems stupidly simple. Google 
and other search engines have not helped as i have not found anything 
particular to this.

Again, thank you in advance for any assistance.

Josh Perlmutter
CA Technologies


Sincerely,
Josh Perlmutter
CA SiteMinder Technical Support Engineer
Contacting support...
...By Phone: 1-800-CALL CAI (225-5224)
...Via the Web: https://support.ca.com

Any questions or concerns, please feel free to contact my manager Bill Miller 
Manager, CA Technologies Support
(508) 628-8858
william.mill...@ca.com<mailto:william.mill...@ca.com>

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and contain information that may be privileged and 
confidential.  Any unauthorized review, use, disclosure or distribution is 
prohibited.  If you are not the intended recipient of this e-mail, please 
delete this e-mail and any files transmitted with it and notify the sender 
immediately.

________________________________

This message may contain confidential or privileged information. If you are not 
the intended recipient, please advise us immediately and delete this message. 
See http://www.datapipe.com/legal/email_disclaimer/ for further information on 
confidentiality and the risks of non-secure electronic communication. If you 
cannot access these links, please notify us by reply message and we will send 
the contents to you.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to