INFO: VB6 Readme: Part 6 Wizard Issues
Symptoms
The information below includes the documentation and workarounds for VisualBasic 6.0. This information can also be found in the README.htm file thatships with Visual Basic 6.0 on the Visual Basic 6.0 CD-ROM. Please see theREFERENCES section of this article for a list of the Microsoft KnowledgeBase articles relating to the Visual Basic 6.0 readme.
Following is a list of all parts of the readme file:
Part 1.Important Issues Please Read First!
Part 2.Data Access Issues and DataBinding Tips.
Part 3.Control Issues.
Part 4.Language Issues.
Part 5.Samples Issues.
Part 6.Wizard Issues.
Part 7.Error Message Issues.
Part 8.WebClass Designer Issues.
Part 9.DHTML Page Designer Issues.
Part 10. Extensibility Issues.
Part 11. Miscellaneous Issues.
Part 12. Microsoft Transaction Server (MTS) Issues.
Part 13. Dictionary Object.
Part 14. Visual Component Manager.
Part 15. Application Performance Manager.
Resolution
Package and Deployment Wizard (PDW):Automatically Picks Up Files From Redist DirectoryA new feature of the Package and Deployment Wizard is its ability pick upfiles from the Redist folder. An example of how the feature is used wouldfollow the steps below:You have created an application that is ready for packaging.The application depends on a certain system file “MySysFile.dll” which,until recently, has been a stand-alone file. But now a recent systemupdate has made that file dependent on other files to function properly.However, a stand-alone version of the system file is also supplied.To simplify setups, you place that stand-alone version into the Redistfolder.When creating your deployment package, you navigate to the system fileto instruct the wizard that the system file should be included.Instead of picking up the system file (which is dependent on otherfiles), the Package and Deployment Wizard will pick up the stand-aloneversion that is in the Redist directory.
By default, no files are placed in the redist folder.
Package and Deployment Wizard Has [Do Not Redist] SectionA new section has been added to the Package and Deployment VB6Dep.ini file:[Do Not Redist]
Two kinds of files are listed under the new section:Files that are not needed at run-time. For example, ActiveX designersoften require two file references, one for design-time, and one for run-time. Since the design-time reference is not needed, it is listed in thesection and is not included in the package.Files that cannot be redistributed by the Package and Deployment Wizard.Some dependent files are not installed by Visual Basic, but must beinstalled by another component. For example, the following files areinstalled by Internet Explorer 4.x: Shdocvw.dll and Mshtml.dll.
Package and Deployment Wizard: In Silent Mode the NotificationWindow May Not Be First in the Window Z-orderWith Visual Basic, it is possible to run the Package and Deployment Wizardin silent mode from a command prompt. When doing so, you can also set apath for logging the wizard’s output (/l ). With the path set, the wizardwill create a log of events. If you do not use the argument, the wizardwill instead display a dialog box to notify you of the wizard’s completion.However, the window is not always obvious because it may be underneathother windows. In order to see it, you may need to close or minimize allother windows.
For more information, search online for “running as a stand-alone” inVisual Basic Concepts in the MSDN Library Visual Studio 6.0 documentation.
Package and Deployment Wizard: Command Line Mode Argument Added forSpecifying Executable PathAn argument has been added to the command line mode of the Package andDeployment Wizard. The argument is shown in the table below:
ArgumentDescription/e pathUse the argument to set the path for the project’sexecutable file if it is different from the project’spath. The argument allows the command line mode to be used in a multi-developerenvironment where a computer is dedicated to compiling the project andcreating the package.
For more information, search online with Package and Deployment Wizardselected, for running as a stand-alone in the MSDN Library Visual Studio6.0 documentation.
Package and Deployment Wizard: Manually Add User Control License FilesWhen creating a package for a user control that requires a license key, thelicense file (.vbl) is not automatically included. Instead, you must addthe file manually.
When you are at the dialog titled “Package and Deployment Wizard IncludedFiles,” click the Add button and search for the appropriate .vbl file.
Package and Deployment Wizard: Steps in the Web Deployment ProcessWhen you post an Internet package to a Web server using the Package andDeployment Wizard, the wizard uses a technology known as WebPost to copyyour package to the server and process it appropriately. These are thesteps that the WebPost process goes through when processing your .cab:It extracts the .cab file into a temporary directory.It locates the .inf file for the .cab file.Based on the contents of the .inf file, the WebPost process installsapplication files (based on the RInstallApplicationFiles section of the.inf file), installs system files (based on the RiinstallSystemFilessection), and installs shared files (based on the RInstallSharedFilessection). In the process, it registers any necessary files.NOTE: The DefaultInstall section of the .inf file is not run, because theinstructions it contains often require user input. The WebPost process alsodoes not create a virtual directory for your application, if one isrequired; directories must be set up in advance.
Package and Deployment Wizard: Web Deployment Tips for HTTP or FTP ProtocolIf the .cab file you are attempting to deploy to a Web server is copiedto the server but is not unpacked, make sure you included the .cab fileon the Items to Deploy screen, and that you used HTTP Post as theprotocol on the Web Publishing Site screen. In addition, you must havechecked the Unpack and Install Server-Side Cab check box on the WebPublishing Site screen. If you did not, try re-deploying your packageagain with this option selected.
NOTE: Cab unpacking is supported by Posting Acceptor 2.0 running on IIS4.0. If you receive an error saying that the Web server you selecteddoes not support the service provider you selected, there are severalthings you can do to try to fix this problem:If you are using the HTTP Post protocol, make sure that PostingAcceptor is installed on your Web server. If you are running IIS4.0, install Posting Acceptor 2.0. If you are running IIS 3.0,install Posting Acceptor 1.0. Cab unpacking is not supported byPosting Acceptor 1.0.Ensure that your URL is correct. If you are using HTTP Post,ensure that your URL begins with “http://”. If you are using FTP,ensure that your URL begins with “ftp://”.If you are uploading to a server location that has PostingAcceptor 1.0 installed, you cannot select the option to unpack andinstall your cabinet files when you deploy your package using thewizard. If you receive an error C0042115 that the query stringINSTALL is invalid, check your server configuration to determinewhat version of posting acceptor is installed. If it is version1.x, deploy your cab again, making sure to deselect the Unpack andInstall Server-Side Cab option.If you need to use the FTP protocol to post to a URL beginningwith “http://”, you may be able to resolve this error by adding thefollowing entry to the end of your Web server’s postinfo.asp file,usually located in the scripts directory on the Web server:[{02B5E1D1-8B7C-11D0-AD45-00AA00A219AA}]ServerName=” <%= Request.ServerVariables(“SERVER_NAME”) %>”MDAC installation requires DCOM95 to be installed. Setup programscreated with the Package and Deployment Wizard install the MicrosoftData Access Components (MDAC), which includes OLE DB, ADO and Jet,via the MDAC installer program: Mdac_typ.exe. This EXE requires thatthe machine being installed to have DCOM95 (or the newer DCOM98)installed on it.
If the MDAC intaller fails with a “DLL registration failed” message,this is because DCOM was not found on the machine. To restorefunctionality of existing data components, install DCOM95 and run theinstaller again.If you use the HTTP Post protocol and receive an error that you do nothave write access for the Web server, open the Internet Service Manageron the server computer, access the node for your Default Web Site(Console Root \ Internet Information Server \ machinename \ Default WebSite), choose Properties, select the Home Directory tab, and check theWrite check box.If your files are read-only when you try to post, you will receive anerror C0042116 announcing that processing has stopped. Change your fileattributes to proceed.Be aware that if you post a file to a directory where the same filealready exists, the file on the server will be overwritten and nowarning message will be displayed.If you use the FTP protocol and receive an error that access is denied,open the Internet Service Manager on the server computer, access thenode for your Default FTP Site (Console Root \ Internet InformationServer \ machinename \ Default FTP Site), choose Properties, select theHome Directory tab, and check the Write check box.If you use the FTP protocol and receive additional errors besides theone described in the previous bullet, make sure that you have properlyconfigured your FTP service on the Web server. To do so, start theMicrosoft Management Console (MMC), then follow these steps:Right-click on Default FTP Site and choose New Virtual Directory.Enter an alias to be used to access the virtual directory, thenclick Next.Enter the physical path of the directory to which to map thevirtual directory (for example, c:\inetpub\ftproot) then clickNext.Select the appropriate access permissions, making sure to allow writeaccess so that your deployments can proceed without errors, thenclick Finish.Right-click on Default FTP Site and choose Stop.Right-click on Default FTP Site and choose Start.
When you deploy to the FTP server using the Package and DeploymentWizard, use the site FTP://servername/alias where alias is the aliasyou assigned in step 2. Use the username “anonymous” and the password”me@somewhere” for anonymous login.
Package and Deployment Wizard: Start Menu Items: Run Option Not SupportedWhen creating a package for deployment, you can also create a Start menuitem. Although it is mentioned in the Help topic for the dialog box, theRun option is not supported.
System Configurations for WebPost’s Posting AcceptorWhen you deploy your packages to a Web server, the Package and DeploymentWizard uses a technology known as WebPost to move your files to the desiredlocation. WebPost consists of two main components:The Package and Deployment Wizard, which sends your content to aqualified site.A Posting Acceptor, located on the Web server, that enables the postingof content to an IIS server.There are multiple versions of Posting Acceptor available. You must makesure you install the correct version on your Web server based on yourmachine configuration. The following table lists the appropriateconfigurations:
Use thisif you are runningComments————————————————————————–Posting Acceptor 2.0Windows NT 4.0 with SP3Posting Acceptor 2.0IIS 4.0supports both contentposting and theunpacking of cabinet(.cab) files on theserver.Posting Acceptor1.0 Windows NT 4.0You cannot unpack .cabwith SP3with this versionIIS 3.0files of postingacceptor. Use this forcontent posting only.You can move yourfiles to the serverand then manuallyregister any necessaryfiles that would havebeen registered by the.cab process. NOTE: Posting Acceptor does not work on any platforms that are usingPersonal Web Server or Peer Web Server. You must use IIS. Steps forinstalling Microsoft Posting Acceptor 2.0 if you have Visual Studio orVisual Basic Enterprise Editions.Launch Visual Studio or Visual Basic setup from your installation CDs.When prompted to choose options to install, click Install ServerApplications and Tools, then click Next.Click Launch the BackOffice Installation Wizard, then click Install.Now select the radio button for Custom, then click Next. You will see the options to install and their sizes. Click Next.Select Microsoft Posting Acceptor 2.0.You can install Posting Acceptor 2.0 from the Deploy folder of VisualStudio installation CD number 2. Posting Acceptor 1.0 can be installed fromthe Microsoft Posting Acceptor Information Website. If you want to installPosting Acceptor 2.0 on a computer that already has the Windows NT OptionPack, you should first check to see if version 1.0 of the Posting Acceptoris already installed. If so, remove it before installing version 2.0. Todetermine if 1.0 is installed, select the NT Option Pack on the Add/RemovePrograms mechanism of the Control Panel. Click Add/Remove, then look forPosting Acceptor 1.0 among the components listed. You may find it underMicrosoft Site Server. If it is installed, remove it. You can then installversion 2.0 by running PASetup.exe.
Package and Deployment Wizard: Edit Setup.lst File If YouRebuild Cabs From Batch FileAfter creating a standard setup package using the Package and DeploymentWizard, you can manually recreate the setup files (Setup.exe, Setup.lst,and all .cab files) by running the batch file found in the in the Supportfolder. Doing this allows you to manually customize the package or torecreate a package without running the wizard again. Running the batch filewill copy setup.exe and setup.lst from the Support folder to the Packagefolder and will generate the cab file(s) in the Package folder. However,once the batch file is finished, setup.lst will not know how many .cabfiles were generated. Unless this problem is remedied, the setup programwill fail.
To remedy this situation, do the following:Before running the batch file, delete all .cab files in the Packagefolder.After running the batch file, count the number of cabs produced by thebatch operation.Open the Setup.lst file in the Package folder with a text editor. NOTE: There are two Setup.lst files. One is found in the Support folder. Thesecond is found outside the Support folder, in the Package folder wherethe .cab files are created. Be sure to open the Setup.lst file in thePackage folder.In the text editor, look for the following lines, which are at the topof the file):
[Bootstrap]SetupTitle=InstallSetupText=Copying Files, please stand by.CabFile=Projec1.CABSpawn=Setup1.exeUninstal=st6unst.exeTmpDir=msftqws.pdw After the last line (TmpDir=msftqws.pdw), insert the following linewhere N equals the number of cabs generated:
Cabs=N The Setup.lst should now be up to date, and the setup won’t fail.
Package And Deployment Wizard: Error 80042114If you are creating a package for Internet deployment and you get thefollowing error:
“Unexpected error 80042114 has occurred: The Web server you selecteddoes not indicate support for the service provider you selected. Do youwant to proceed anyway?”This error occurs because you have specified that your package should beposted to an FTP site using an HTTP URL. If you are certain that you haveaccess privileges to the web server, you can click “Yes” and the deploymentwill proceed.
To avoid this error in the future, when creating a package for deploymenton the same server, specify the site and its protocol. When you do so, thefollowing dialog box will appear:
“The specified URL and publishing method can be saved in the registry asa Web publishing site. This ensures that the URL and publishing methodare valid and saves you time in future deployments to this site. Do youwant to store this information as a Web publishing site?”
If you select “yes,” this saves the site information and you will no longerreceive the 80042114 error.
Package and Deployment Wizard: Use Mdac_typ.Cab and Mdac20.Cab toDistribute Data Access ComponentsWhen your Internet Package includes any of the following four files, thewizard will by default set these files to be downloaded from:
http://activex.microsoft.com/controls/vb6/mdac_typ.cab(http://activex.microsoft.com/controls/vb6/mdac_typ.cab)
MSDAOSP.dll
MSADO15.dll
MSADCF.dll
ODBC32.dll
Similarly, the wizard will, by default, set the following files to bedownloaded from:
http://activex.microsoft.com/controls/vb6/mdac20.cab(http://activex.microsoft.com/controls/vb6/mdac20.cab)
MSADOR15.dll
MSADCO.dll
In both cases, these defaults are indicated as the “Download from MicrosoftWeb site” option on the File Source screen. These cab files (mdac_typ.caband mdac20.cab) perform special handling that should not be attemptedmanually. In order to ensure that the proper handling takes place, yourInternet cab should not include these files but rather should reference thecabs. Therefore, you should never choose the “Include in this cab” optionfor any of these files. In addition, if you choose the “Download fromalternate Web site” option, you should be careful to specify cabs that arecopies of these cabs to ensure that the proper handling takes place.
Do not change the default settings for these files.
Package and Deployment Wizard: Manually Include .ASP and .HTM FilesFor IIS Applications When Using Standard SetupIf you use the Package and Deployment Wizard’s standard setup to deploy anIIS application, you must manually include any .asp or .htm files with thepackage. Add the files using the Include Files dialog box.
Package and Deployment Wizard: Bad Date and Time FormatsIn certain situations, the Package and Deployment Wizard will incorrectlywrite time and date information to the Setup.lst file. When this occurs,the setup will fail because the dates will be written in a form that thesetup.exe can’t read. The problem occurs when you create a deploymentpackage using the US version of Visual Basic on:A computer using the German version of Windows (NOTE: the German versionof Visual Basic will work correctly.)Any computer where the date separator isn’t either a forward slash (“/”)or a dash (“-”).To fix the bad formats:From the Start menu, open Control Panel.Click the Regional Settings icon.On the Date tab, change the Date separator to “/”.On the Time tab, change the Time separator to “:”.Run the Package and Deployment Wizard.Restore the date and time settings.
Package and Deployment Wizard: Unable to Run Setup.exe onFirst Windows 95 VersionAny setup package built with the wizard will not launch on certaininstallations of Windows 95 due to lack of support for an API in theoriginal version of the Oleaut32.dll. This failure will not occur on OSrelease 2 of Windows 95 or any versions of Windows NT 4.0 and later, andwill not occur if Microsoft Office 97 or Internet Explorer 3.0 or 4.0 hasbeen installed. Any installation of a Visual Basic 5.0 application willalso remedy the situation. You can also work around this failure by firstoverwriting the older version of Oleaut32.dll with the latest version. Besure to shut down all applications before attempting to manually updateOleaut32.dll.
Package and Deployment Wizard: Packaging ActiveX DocumentsThe Visual Basic 6.0 Package and Deployment Wizard can insert CODEBASE= andVERSION= information directly embedded into the .vbd file for your ActiveXDocument project. This eliminates the need for having the extra .htm filepreviously used to launch ActiveX Documents. The embedded informationallows Internet Explorer to read the .cab file name for your ActiveXDocument code and version information from the .vbd file and carry out theinstallation. You can now navigate directly to the .VBD file and your Userdocument code will download if necessary.
The same functionality was available for Visual Basic 5.0 setup using theSetCodeBase utility found on the Visual Basic Owners Area.
The following are some issues with Visual Basic 6.0 Package and DeploymentWizard generated setups for User documents:Internet Explorer 3.x. 4.0, and 4.01 cannot read the embeddedinformation in the VBD file. The wizard also generates an old (VB5)style .htm file. This .htm file can be used to launch ActiveX Documents.You must first modify the .htm file, however, since most of the code iscommented out. After removing the comments and an extra <A> tag (<ahref=xxxx.VBD>xxxxx.VBD</a>) from the top,from the top, the file will only be anOBJECT tag with the CLSID of your User document and some script code forWindow_OnLoad event.Internet Explorer 4.01 with Service Pack 1 and later will read thisinformation correctly from the .vbd file.
