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

Posted on 2009-02-19
Last Modified: 2013-12-29
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.
Question by:ansh26121981
    1 Comment
    LVL 39

    Accepted Solution

    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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now