Question

I have a VB6 app that loads initially (for a small prompt to enter a license key, only on the first time). It works fine on my machine (windows 7).

I had complaints of it crashing on someone else's machine (both xp and 7), so I made a Windows XP virtual machine. I installed it on the virtual machine, it crashed. I wanted to see where it crashed so I installed Visual Studio on the virtual machine so that I would get a debug prompt. When I ran the program again, it worked.

I am more familiar with C++ and had these kinds of problems, so I figured it was some sort of runtime issue.

I found this VB6 SP6 Redistributable Runtime:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=24417

I installed that, and it still wouldn't run.

Any ideas where to go from here?

Edit:

I have tried depends.exe, it only shows MSJava, which I've heard I can ignore. Does depends.exe also show things like .ocx (Active X controllers?) that are required?

Also, from the cmd prompt, %errorlevel% doesn't seem to get populated. Is that a VB6 things, or does that indicate that this is truely a crash and not a user exit?

Was it helpful?

Solution

Open the Visual Basic project and check both "References" and "Components" under the "Project" menu.

Since it is crashing with the VB runtime installed it is likely a component that you have referenced in the project that either does not exist (or is not registered) on the client under test.

This should be a simple fix.

OTHER TIPS

I had the same problem on my windows 7 computer. I have uninstalled everything, changed my windows theme to Windows Classic.

I changed following properties of VB setup file. Right click on setup.exe and go to properties and in compatibility tab change the compatibility mode to windows XP SP2. And in settings uncheck the following check boxes.

  • Disable Visual themes
  • Disable Desktop composition
  • Disable display scaling on high DPI settings.
  • Run this program as an administrator

And have completed installation.

Followed by installing VB 6 service pack 6 from here. http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=24417

Hope it helps.

It may require something else other than just the runtime, have you tried viewing it with dependency walker http://www.dependencywalker.com/ on the machine that it crashes on?

It should quickly point out any missing references.

Maybe try again, create a new VM, but install the remote debugger instead of the full VS.

You should create an installer for your application. There may be more dependencies than just the VB6 runtime. A good installation tool will detect at least some of necessary dependencies for you. Have a look at this question or this question

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top