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

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

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.

  • 2
1 Solution
JohnCarlMorganAuthor Commented:
When I say key it's actually a REG_SZ entry I'm trying to read, not a key.
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
JohnCarlMorganAuthor Commented:
Thanks mate!  Exactly what I wanted.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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