Reading Registry value...

V

vishal singh

Hi,
I am trying to read a value from a registry key using
RegRead method but it does not seem to work. Here's the
code that I am using:

Dim objShell
Dim strDBName=""

Set objShell=Server.CreateObject("WScript.Shell")

strDBName=objShell.RegRead("HKCU\Software\VB and VBA
Program Settings\excalibur\RegParams\DatabaseName")

But this always gives an error "Invalid root in registry
key".

Is there any other/better way of doing this?

An help with some sample code will be greatly appreciated.

Thanks,
Vishal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top