This article was previously published under Q152559
This article has been archived. It is offered "as is" and will no longer be updated.
Under some circumstances, the 16-bit Edition of Visual Basic 4.0 will notinstall on a Windows system. This behavior is most typically demonstratedby a failure to extract information from a CAB file, but other persistenterrors may also occur.
This article describes how to work around this behavior.
WARNING: The method described here should only be used as a last resort.
This method assumes that the customer has access to a working copy ofVisual Basic on another system because many of the files required by the 16-bit Edition of Visual Basic 4.0 are incompatible with Windows 95 andWindows 98 system files of the same name. Rather than provide informationthat could possibly trash a system, we feel it is better to provide a lessrobust solution. A set of install disks for VisData and the three extractedfiles can always be sent if customer has no access to a working system.
Copy the contents of the \VB directory from the CD-ROM to the \VB directory on your local hard drive. You should delete the \VB\System, \VB\ODBC, and \VB\MSApps directories from your local hard drive. If you will not be using the 32-bit version of Visual Basic 4.0, you may safely delete all files in the \VB directory that contain the string 32.
Copy vaen2.dll, vba2.dll, and all the *16.OCX files from the \vb\system directory on the CD-ROM to the \windows\system directory.
Expand the control licensing .REG file by running the appropriate line from the \SETUP directory of the CD-ROM in a Command prompt:
EXTRACT /L C:\VB /E VB4-6.CAB VBPRO.REG
EXTRACT /L C:\VB /E VB4-6.CAB VBENT.REG
These commands will sometimes fail due to the inability to create a temporary file on the CD-ROM. Assuming that the CD-ROM is drive F:, the following will work even if the user does not have a TEMP environment variable set. From the root of the C: drive (or any other drive to which the user has write access):
If you cannot locate this file, type the following line from the \SETUP directory of the CD-ROM in a MS-DOS Command prompt:
EXTRACT /A /D VB4-1.CAB VBPRO.REG | MORE
EXTRACT /A /D VB4-1.CAB VBENT.REG | MORE
From the \vb directory of a system with a working copy of Visual Basic 4.0, copy vbide.dll and vbext.olb to the \vb directory on the target system. They can also be extracted from the product CD-ROM as follows:
EXTRACT /L C:\VB /E VB4-8.CAB VBIDE.DLL
EXTRACT /L C:\VB /E VB4-9.CAB VBEXT.OLB
From a system with a working copy of Visual Basic 4.0, use the Application Setup Wizard to create disks for the \vb\samples\VisData\VisData.vbp 16-bit Edition of the Visual Basic 4.0 sample app.
Take the disks that you have just created to the target machine and run SETUP.EXE from the first disk to install the VisData sample.
Run vb4pro.reg by double-clicking it from File Manager. Alternately, enter the following Command at the MS-DOS Command line:
You should now be able to execute VB.EXE normally. If Visual Basic protests that SHARE.EXE is not installed, exit windows and restart it to activate VSHARE.386, which was installed with the VisData sample. This should not occur on Windows for Work Groups systems.
Other dependency files will probably be required as well, but the aboveprocedure should get the Visual Basic 4.0 16-bit Edition IDE going. Thesedependencies can be found in \vb4\setupkit\kitfiles\sw16tmpl.ini. TheRegister keyword will specify $(DLLSelfRegister) or $(EXESelfRegister) ifthe dependency requires registration. Use the \tools\pss\regsvr.exe utilityfrom the CD-ROM, which is not normally installed by the Visual Basic 4.0setup, to register the file manually. For example: