VBScript shell.regread fails for entries with "\" in name

Posted on 2006-03-29
Last Modified: 2008-01-09
How can I read a registry key which has a “\” character in the name?

Regread always fails with "invalid root in registry key” as it thinks the \ is denoting another subkey.

Question by:JohnCarlMorgan
    LVL 4

    Author Comment

    When I say key it's actually a REG_SZ entry I'm trying to read, not a key.
    LVL 14

    Accepted Solution

    This is a limitation of the RegRead method. You can read registry values using WMI. Take a look at the following pages for samples on reading registry values of different types:


      Nayer Naguib
    LVL 4

    Author Comment

    Thanks mate!  Exactly what I wanted.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Javascript: Crash Course

    Javascript is not only emerging as the most important language to know, it's flexibility is unique. With Javascript being deployed on the web, mobile and even the desktop this is the one language that all technologists need to know.

    I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    737 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

    18 Experts available now in Live!

    Get 1:1 Help Now