• 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.

 
0
JohnCarlMorgan
Asked:
JohnCarlMorgan
  • 2
1 Solution
 
JohnCarlMorganAuthor Commented:
When I say key it's actually a REG_SZ entry I'm trying to read, not a key.
0
 
nayernaguibCommented:
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:

  http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/registry/
  http://www.serverwatch.com/tutorials/article.php/1476831

_______________

  Nayer Naguib
0
 
JohnCarlMorganAuthor Commented:
Thanks mate!  Exactly what I wanted.
0
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