Error accessing Project > References window?
Asked Answered
K

13

13

In Visual Basic 6, when I attempt to access Project > References, it throws an error:

Error accessing system registry

I am:

  • Logged in as the local computer administrator
  • running Windows XP Professional and
  • I can execute regedt32.exe and access all the registry keys just fine.

VB6 was installed as the local administrator.

Any idea why this happens?


I'm running crystal reports 8.5 and it supposed to already have fixed that issue but apparently I still have the issue with 8.5 installed. I have also made the attempt of reinstalling crystal reports with no luck on the issue.

Kelton answered 19/9, 2008 at 18:36 Comment(0)
W
22

Depending on the Windows OS you have (I have Windows 7 Enterprise), you might want to try giving administrator rights to the REGTLIB.EXE (located in C:\Windws). Right click on the REGTLIB.EXE file. Select Properties from the pop-up menu. Then select the Compatiblity tab. On the Compatiblity tab, check/select the Run this program as Administrator checkbox. Click OK to save your changes. It might take take care of the problem for you. It worked for me. Good luck.

Wolf answered 12/11, 2009 at 18:36 Comment(3)
How in the heck did you figure this out? I'm (sadly) building some VB6 code on a virgin Windows 7 x64 bit box with a MINIMUM vb6.exe install (I unchecked EVERY option). And got stuck and found this. I'd give you 20 up points if I could. VB6 sucks. COM sucks. This post was awesome.Heddi
I can confirm that this one did the trick for me! The containing folder for me was C:\Windows\Microsoft.NET\Framework\v4.0.30319Caston
I think this occurs when VB6 is installed without being the Administrator. I first installed it without being Administrator and the installer didn't complain for me until I went to open a VB6 project in the IDE. However, after uninstalling and then installing again by selecting the Run as administrator option from the right click menu, I didn't get this error.Benge
L
13

For me this worked:

  1. goto C:\Program Files\Microsoft Visual Studio\VB98
  2. change the property of VB6.EXE by right click->Compatibility In privilege level section, check the option Run this program as Administrator
Libb answered 29/10, 2016 at 15:51 Comment(3)
I've tried all the answers and this solved my problem, thanks (I am running VB6 at windows 7 x64)Inserted
Confirmed this worked for me on Win10 64bit. Funny thing is this has not been a problem until today (Monday)... It had no issues (other than being crappy vb6) all last week! I can't wait to be done with vb6/com!Dibucaine
I used path C:\Program Files (x86)\Microsoft Visual Studio\VB98 & followed step 2 to solve the issue.Silvas
O
5

If you're running Office 2010 (Beta) Word (apparently) writes a restricted registry key. VB throws the error when scanning the registry. The key I have is:

HKCR\TypeLib\{00020905-0000-0000-C000-000000000046}\8.5

For Regmon - Filter for Process Name -> "vb6.exe" and Result -> ACCESS DENIED. Helps find it very quickly.

Fixed it with PSToosl (PSEXEC) to run registry editor. The command line is,

psexec -i -d -s c:\windows\regedit.exe

psexec needs to be run with elevated-permissions.


Edit by Jim: I'm on a Windows 7 (x64) box. Elevated permissions require the PSTools solution. XP can get away with a little less.

Outfall answered 10/12, 2009 at 21:46 Comment(0)
B
1

You could try Process Monitor to see which registry keys are accessed.

Blush answered 19/9, 2008 at 22:5 Comment(2)
do you mean regmon? I tried that and everything seems to be ok. Maybe i'm just not using the filtering correctly.Kelton
Yeah I meant regmon. Process Monitor bundles regmon, filemon and procmon into one app, but it is basically the same thing. You should see which Keys VB tries to access and if it was a success or a failure. Obviously you should look for failures.Blush
R
1

I got this on a machine that I was using for VB6 development. I had been building a lot of COM DLLs from VB6 (without binary compatibility) and the cruft that had built up in the registry eventually got too much.

Have a look at what size the registry is and what limit you have set. I doubled the registry size and then went looking for a good registry hoover.

Romelda answered 21/9, 2008 at 2:50 Comment(0)
B
1

Here is a solution from Microsoft. It references the Crystal Reports problem, but the solution just uses regedit32 to walk the HKEY_CLASSES_ROOT\TypeLib and HKEY_CLASSES_ROOT\CLSID registry branches for dimmed keys and correcting the security on those keys. There are also instructions to fix the security if regedit32 is unable to access the key. Article ID: 269383

Bitner answered 11/12, 2009 at 20:18 Comment(0)
A
1

In Windows 7 go to start menu then right click "Microsoft Visual Basic 6" then select properties and click Compatibility from the dialog box that appears then tick "Run this program as an administrator".

Ammons answered 19/8, 2015 at 14:14 Comment(0)
H
0

Have you tried this? Basically, it seems that it is a crystal reports issue. Hope that helps.

Horning answered 19/9, 2008 at 18:43 Comment(0)
B
0

Perhaps worth a try going to the "User Account Control Settings". Regards,

enter image description here

Berardo answered 17/10, 2012 at 20:15 Comment(0)
L
0

When I installed VB6 on Win7-64 (using instructions easily found by a search engine), it worked fine. UAC was off -- i.e. set to "never notify."

After a few weeks I turned UAC on -- i.e. set it to its default. VB6 then couldn't compile because of the "Error accessing the system registry" problem. Unfortunately, turning it off again didn't help. Apparently the damage done by turning it on was irreversible. I can't explain why this should be, but that's my experience.

Giving REGTLIB.EXE administrative privileges while leaving UAC off sounded like a great idea, but that didn't work for me either.

Finally, using Process Monitor and PsTools as described in other posts here worked. However, I had to give Full Control to large parts of my registry to Everyone. This didn't apply just to isolated keys. It seems that the compiler needs to add keys to major nodes, so I had to open up these entire nodes.

Aside from the fact that working through these steps took hours, I'm now much more exposed than I was before I tried to increase security via UAC, However, I need VB6 and don't see another solution short of a new computer.

Lesson: Don't use UAC with VB6. Except if you've arrived here it's too late for that.

Lamprey answered 13/6, 2013 at 17:58 Comment(0)
P
0

It's VB6 installation issue. Try to re-intall VB6 on your system. Otherwise open "visual studio 6.0" with "Run as Administrator". Then open/browse your project .vbp file via - New Project -> Existing tab.

Pyrostat answered 27/12, 2013 at 22:7 Comment(0)
A
0

I have fixed the problem. But none of the suggestion above worked. What I did is giving everyone full control over the SYSTEM key in the registry. This creats a security break. I am running 64bit Windows 7 with vb6 serice pack 6B.

Annunciata answered 8/1, 2018 at 17:49 Comment(0)
G
0

I'm running Windows 10 Pro (10.0.16299 Build 16299) 64 bit. I was having this error when trying to compile a VB6 DLL.

I saw several answers in this post about running in compatibility mode as administrator. I thought I would first try just running in compatibility mode for Windows XP (sp2). I was able to compile my DLL after checking that box. I didn't need to run as administrator.

Gospel answered 24/2, 2018 at 22:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.