Prerequisite for Win 10 using vb6 activex documents or webbrowser control - vb6

I am trying to install a legacy VB6 app on a Windows 10 Enterprise PC. The app has an install program and it is installed on many Windows server 2016 machines. This program uses active user documents (dob files) that load in a webbrowser control. The install is successful but when I run the program instead of loading the user document in the webbrowser control i get a dialog box asking me if I want to download or save a 'vbd' file with the same name as the active x dll the user document creates.
My question is if anyone knows if there is a prerequisite to having the vb6 webbrowser control or active x documents work on a Windows 10 machine? I have the dll registered and the registry entries match the Windows 2016 server.
Thanks in advance,
Hank

Here's the relevant (I think) part of the VB6 help for ActiveX Documents:
A few of the more common problems in Internet Component Download and their solutions are listed in this section. These include: [...] Prompt: "Opening file DocumentName.VBD. What would you like to do with this file? Open it or save it to disk?
The proposed solution to this is
This error occurs when the Visual Basic runtime library (MSVBVM60.DLL) is not installed. Generally, this occurs when the safety level in Internet Explorer is set to High. To correct this, you must set the safety level in Internet Explorer to Medium or None.
Note sure when this help entry was written, but with the latest IEs, you add the site in question to the Intranet zone and change the setting there. If that actually resolves the problem, you then should try turning security up again by going into "Customized" and add restrictions again that don't cause it to break again.

Related

Why am I getting a msinet error 339 on windows 7/8

On some systems windows 7/8 my vb6 application gets the msinet error 339.
Component ‘MSINET.OCX’ or one of its dependencies not correctly registered: a file is missing or invalid.
I'm wondering if I need that ocx.
How can I tell if I am using the msinet.ocx? And whether I need it?
I notice Microsoft Internet Controls checked as a component and also Microsoft Internet Transfer Control 6.0 (SP6). Are either of these MSInet.ocx?
Microsoft Internet Transfer Control 6.0 (SP6). Load the OCX as a reference by filename and it tell you it's name.
Rebuild the setup program, msinet is normally included if used.
Registration issues can also crop up relating to Internet Explorer 10. If the OCX is present on the systems in question but seemingly not registered, then the solution can be to uninstall IE 10 (normally best to remove all versions of IE that Windows will let you - they're found under Windows Updates, rather than programs, incidentally). After removing these versions, you are free to reinstall the latest version of IE.

Windows Logo Kit v1.6 - Test Driver for Win7

I've been assigned to download and install the Windows Logo Kit v1.6 to test a driver for Windows 7. What I have done so far is installed the controller and the studio on a clean Windows 2008 R2 64 bit machine. I also have another clean Windows 7 Pro 32 bit as a client. After the installation, the client machine shows in the Studio.
The next step is to install the driver on the client PC. I've tried googling around to find documentation for this part, but I haven't found any.
How do i install the driver on the client PC? Do i just install it the way I always do or is there a special procedures that I need to follow?
At the studio, there so so many tests to run. How do I know which test to select?
I really don't understand what the problem appears to be, especially since DTM.chm is pretty clear on what to do and how and when. The basic steps if you have set up the DTM controller and clients and registered the clients in a "machine pool" are to open the DTM Studio on the DTM controller and then (quoting the online documentation):
Open Driver Test Manager (DTM) Studio.
On the Explorers menu, click Device Console.
Select View By Submission.
From the Submission control, click New Submission. The Create New Submission Wizard appears.
From the Select OS dialog box, click the Windows operating system that is installed on the client, and then click Next.
From the Select Category window, click ...
... and this is were it depends on your driver class etc. So without a refined question no refined answer.
Anyway, skipping a few steps ahead:
Type the path to the INF file and click Load. You can also use the Browse button to find your INF file.
... this is where you are selecting your - hopefully correct and tested - INF file and the rest again depends on what you want to achieve.
If you have an MSDN subscription you also have a number of support incidents "free of charge" per year, which may be a good idea if you get stuck here. However, so far the documentation was reasonable enough to see us through ...
Note again: the whole process depends on your driver class.
Also note: there is a list of errata (Microsoft's terminology). Make sure those are up-to-date and not expired, because if you have a driver class with special needs, some tests will likely fail and you need to select the errata that apply to your driver then to achieve the 100% result required to get it cross-signed. We don't do the full Windows Logo process, though, but the DTM part should be the same anyway.

Running activex dll fromVB6 under windows 7

I'm adding some functionality to an old admin tool written in VB6. The tool uses a c++ activeX object. I haven't worked on the tool since I upgraded to windows 7 and now the active X object fails to load with the 429 "ActiveX component can't create object" error. I'm not knowledgeable about VB6 but I have registered the activex dll and type library and I can remove and add the object from the project via the project->references window (the program fails to compile when the reference is removed as expected). The VB6 ide is running in administrator mode and I get the same error if I run the exe directly as an administrator.
Has anyone else experienced a similar problem and found a way to sort it out?
Thanks,
Patrick
PS : I have also tried putting the dll in question in the working directory of the exe
EDIT: I've had no luck trying to sort this out and ended up remoting into a windows 2003 server to test the changes.
You might try using Mark Russinovich's regMon and FileMon to see exactly what files or regkeys are being requested during the load of that dll. That can often tell you if you've got a missing dependency.
Also the DEPENDS.EXE that comes with VS6 is sometimes good for that (though it doesn't necessarily get ALL the dependencies of a dll or exe).
COM is going to use the registry to map from the class name to the physical DLL file that has to be loaded.
Check the registry keys pertaining to your COM object... first under HKEY_CLASSES_ROOT, then the class name, which gets you the CLSID, then the HKEY_CLASSES_ROOT/CLSID section for the GUID of the object, and then see where the physical library lives.
A 429 could mean all sorts of different things. Many times, it means that there's a dependency missing, and the easiest way to figure out what dependency is missing is to use procmon to see what files/registry settings the app is trying to access and hopefully, catch where you get ACCESS_DENIED or FILE_NOT_FOUND or what have you.
The problem might also be with your browser. A couple weeks ago I upgraded my IE, since then I've had to make changes by opening IE, click tools, click custom, scroll to the activeX controls and enable, and/or click prompt. The same was needed for scripting and for me to use XMLHttprequest. Now everything is back to working, however the ActiveX warning alert sometimes takes over 2 minutes to pop-up, then when clicked everything works fine.
Do you have UAC enabled on that machine? Have you tried disabling it? I have seen some cases where it let ActiveX controls being registered but didn't let applications using them ran.

How do I make my program work in Windows Vista and Windows 7?

I have an application written in Delphi 2006 that was working fine in Windows XP. I packed the application using Inno Setup, using Program Files as the default folder. A few users migrated to Windows Vista and Windows 7. The issue here is that the application creates some files inside its installation folder by its own. This was working in XP but in Windows Vista the users were having problems with the created files (they don't appear and so on). After investigating the users' reports I discovered KB 927387: "Common file and registry virtualization issues in Windows Vista or in Windows 7."
Running the application with administrator rights just solves the problem, but that is (I think) an awful workaround. I would like to know if there are any directives or tips for making the application compatible with Vista and 7, because more users will migrate to these OS soon.
You need to re-write your application to store its files in the proper locations, even in XP, but especially in Vista onwards, particularly if UAC is enabled. This is becoming more and more important to get right as Microsoft keeps locking down and enforcing its security models with each new OS version. The rules for how to properly manage application- and user-related files is documented on MSDN, for example: "Application Specification for Microsoft Windows 2000 for Desktop Applications, Chapter 4: Data and Settings Management" and "Application Specification for Microsoft Windows 2000 for Desktop Applications Appendix A: Best Practices" (yes, they are old, but are still quite relevant). Look at SHGetSpecialFolderLocation(), SHGetFolderPath(), SHGetKnownFolderPath() and other related functions to help you.
For Vista/Win7, your app can't put the files in a subfolder of Program Files / Programs unless UAC is turned off or the app is running as elevated. Note that "elevated" does not necessarily mean "logged in as Administrator." Non-administrator users can elevate, and Administrator isn't necessarily elevated.
If the app does attempt to write to Program Files but is not elevated, the OS will either block the app or "virtualize" the write (put the files somewhere else), depending upon how UAC is configured. Neither one helps the app succeed at what it was trying to od.
So it needs to put them somewhere else. Where depends on why the files are being created, and you haven't told us that. You can read this article to learn about the options. Note that in addition to the user's AppData and Roaming folders, there is also an "All Users" (shared) profile.
You should probably look at this article and screencast, which discusses UAC in depth from a Delphi point of view.
Files you create for use by your application other than at installation time should go into the ProgramData directory if its global to the workstation, or into the users ApplicationData directory if its specific to the user.
For cases where you absolutely must place a file in the program files directory, you can use com to request elevation. This is discussed in great detail, and delphi specific bits are also available. One example that I have used this is in patching my users installation base. They are warned by UAC that the system needs to make changes, so if your doing this as an automated task, you might need to rethink the logic to be more user driven.
Here is another article, by Zarko Gajic, which shows how to get different system directories. Also have a look at this related question.
I had a similar enquiry here (Stack Overflow).
In the end I realised that I needed to put my application into Program Files at install time (requiring UAC/elevation) and then store my app's data in the user's App Data folder. I had to change the way my program generated 'default' configuration settings and also where I was saving this stuff, but it was worth the effort in the end - we ended up with something that installs and runs fine on XP, Vista and Windows 7.
The only UAC hit we get is at installation time, which makes sense to me (and you get a similar hit at install-time on the Mac too). We didn't have any data that would be common to all users in this particular case but I would have looked at the Program Data special folder if that had been the case.
The installer software we use (Setup Factory) made this fairly straightforward (we just wrote a small bit of code to detect XP versus Vista/Win7 and choose the right special folder accordingly). It would be easy to do this in Inno Setup too, from what limited experience I have of it.

Error accessing Project > References window?

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.
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.
For me this worked:
goto C:\Program Files\Microsoft Visual Studio\VB98
change the property of VB6.EXE by right click->Compatibility In privilege level section, check the option Run this program as Administrator
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.
You could try Process Monitor to see which registry keys are accessed.
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.
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
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".
Have you tried this? Basically, it seems that it is a crystal reports issue. Hope that helps.
Perhaps worth a try going to the "User Account Control Settings".
Regards,
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.
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.
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.
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.

Resources