VB6 reading regsitery

Hello Experts,

I have an application that is supposed to read a registery key and populate a label with it's value. Here is the code:

    Dim oReg As Object
    Set oReg = CreateObject("WScript.Shell")
    lbl_LMIName.Caption = oReg.RegRead("HKLM\Software\LogMeIn\V5\WebSvc\" & "HostDescription")
    Set oReg = Nothing

Open in new window

It works perfect on WinXP but all other OS (7, 2008, 2012) it throws this error:

Run-time error '-2147024894 (80070002)':

Invalid root in registry key "HKLM\Software\LogMeIn\V5\WebSvc\HostDescription".

But the path does exist in the registry. Any ideas on what I am doing wrong?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott CSenior EngineerCommented:
A quick search on that error turned up that there was some kind of incompatibility in the API.


I also found a reference to where there was a bitblip in the registry.


Make sure to go through it character by character.
triphenAuthor Commented:
Thanks for your quick response. I don't believe the first link applies to me and I went through letter by letter for the second link. See attached, the path is definitely there in the right place.

I saw another posting that said it may be due to permissions. How can I elevate my code to run as higher permissions? I already tried right click Run As Admin....
triphenAuthor Commented:
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

triphenAuthor Commented:
triphenAuthor Commented:
triphenAuthor Commented:
No answers, closing question and opening a new one.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
triphenAuthor Commented:
No answers, closing question and opening a new one.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.