• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1046
  • Last Modified:

PERL script to add a registry key to a C++ code

Hello Team

Could you please help me with a perl script code to add a registry entry as follows HKEY_LOCAL_MACHINE\SOFTWARE\MSP\Attributes\userattribute\ScannerProxyPlugin\ScannerType and the attribute name should be wedgemode which should be REG_SZ type in a c++ code.Also please let me know how to read this registry key value using perl script.Please also let me know how to use and run a perl script in a c++ program.Mainly the project is a WIN32 project.
0
ansh26121981
Asked:
ansh26121981
1 Solution
 
Adam314Commented:
The c++ question should be a seperate question.
Here are the perl questions.
use Win32::TieRegistry (Delimiter=>'/');
 
#To set:
$Registry->{'HKEY_LOCAL_MACHINE/SOFTWARE/MSP/Attributes/userattribute/ScannerProxyPlugin/ScannerType'}->SetValue('wedgemode', 'Your_Value_Here', "REG_SZ");
 
#To read:
my $value=$Registry->{'HKEY_LOCAL_MACHINE/SOFTWARE/MSP/Attributes/userattribute/ScannerProxyPlugin/ScannerType/wedgemode'};

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now