triphen
asked on
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:
It works perfect on WinXP but all other OS (7, 2008, 2012) it throws this error:
-------------------------- -
RemoteSupportUpdater
-------------------------- -
Run-time error '-2147024894 (80070002)':
Invalid root in registry key "HKLM\Software\LogMeIn\V5\ WebSvc\Hos tDescripti on".
-------------------------- -
OK
-------------------------- -
But the path does exist in the registry. Any ideas on what I am doing wrong?
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
It works perfect on WinXP but all other OS (7, 2008, 2012) it throws this error:
--------------------------
RemoteSupportUpdater
--------------------------
Run-time error '-2147024894 (80070002)':
Invalid root in registry key "HKLM\Software\LogMeIn\V5\
--------------------------
OK
--------------------------
But the path does exist in the registry. Any ideas on what I am doing wrong?
ASKER
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....
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....
ASKER
Bump
ASKER
Anybody?
ASKER
Bump.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No answers, closing question and opening a new one.
http://answers.microsoft.com/en-us/office/forum/office_2010-customize/run-time-error-214702489-80070002/3bc02610-f710-4136-8640-464f9ed9cf36
I also found a reference to where there was a bitblip in the registry.
http://www.sevenforums.com/windows-updates-activation/310222-windows-7-update-error-80070002-story-fix.html
Make sure to go through it character by character.