Saturday, August 28, 2010

How to get Windows registry key value? Perl?

Hi,

I'm unsuccessfully trying to retrieve a value ("InstallPath") from
Windows XP registry. Is it possible to use vimscript for this? The
code below doesn't work:

perl << EOF
sub getrpath
{
use Win32::Registry;
my ($rkey);
my ($var);
my ($p) = "HKEY_LOCAL_MACHINE\\SOFTWARE\\R-core\\R";
$main::HKEY_LOCAL_MACHINE->Open($p, $rkey) || die "Open $!";
$rkey->QueryValue("InstallPath", $var);
VIM::DoCommand("let x = '$var' | echo x");
}
EOF

Does anyone know how could I get the value of "InstallPath"? The
solution should be good for Windows XP, Vista and 7.

Thank you!

Jakson Aquino

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment