Installing Visual Basic Applications on Linux

Linux's ability to run Visual Basic applications has been improving steadily. In late 2002, Wine was not mature enough to install or run Visual Basic applications. In late 2005, Wine is mature enough to both install and run simple Visual Basic applications -- but a certain amount of fortitude is still required.

I've recently spent some time helping people install Visual Basic applications on Linux using Wine. So far, I've seen four basic kinds of problems:

Installer quits because IE6 isn't installed

Many installers stop with a dialog box saying
"This program requires Internet Explorer 4.01 SP2 or later in order to run."
(e.g. Wine bug 3453) That's awfully pessimistic of them. You can bypass this check by creating a text file foo.txt containing
[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer]
"Version"="6.0.2900.2180"
and then importing it into the Wine registry with
regedit foo.txt
That will often solve the problem, or at least let you get past it long enough to run into the next problem.

Installer crashes because some runtime library isn't already installed

VB installers are supposed to bundle all the libraries that the application will need, but many installers skimp on this. (They get away with it because some other application already installed the libraries, but that doesn't work on Wine, where no or few applications are installed by default.)

The problem is, Wine doesn't make it easy to tell which runtime library you're missing. Oh, it does tell you; it outputs an error message, but it's hidden among thousands of other boring lines like

fixme:ole:ITypeInfo_fnRelease destroy child objects
. To find these lines, run the installer again and redirect the output of Wine to a log file. Then search the log for lines containing the string "err:". Then, if you see a line like
err:module:import_dll Library MSVBVM60.DLL (which is needed by "C:\\foo\\bar\\baz.ocx") not found
look up which installer you need to run to get the missing DLL. If you can guess the vendor (often Microsoft), you can search the vendor's web site for the DLL. In this case, the DLL is part of the Visual Basic 6 runtime, and you can get it by downloading and installing the Visual Basic 6 Runtime installer.

Installer fails because of a Windows API stub in Wine

MDAC, a database runtime library from Microsoft, has an installer which fails silently because of a Windows API that Wine implements only as a stub (see bug 3636). You can check for these by searching the Wine log for the word "stub".

Installer quits complaining "Unable to Register foo.tlb"

The person who packaged the application used DLLSelfRegister when they should have used TLBRegister. I was able to just edit SETUP.LST as described in support.microsoft.com/kb/299645 and rerun the installer to get past this.