我肯定会遵循有关在事件查看器中寻找原因的建议。但我认为您还需要获得适当的部署方法。
首先,我会为 VB6 安装服务包 6,以便您使用最新版本。然后我会做一个合适的msi安装程序。
为此,您需要:
来自 MS 的 Visual Studio 安装程序 1.1。
合并 VB6 SP6 的模块。
合并模块需要从 Visual Studio 安装程序附带的现有合并模块中提取出来,C:\Program Files\Microsoft Visual Studio\COMMON\Tools\VSInst\BuildRes
然后我将创建一个 msi 安装程序并使用它来部署您的应用程序。它将为您注册 dll 并确保已安装依赖项。
要创建安装程序:
1) Open visual studio installer
2) Pick the VB Installer package type in the wizard
3) Change the name to the name of your project
4) Change the location to where you want the installer package to be created (I typically create a folder under the project called Install)
5) Choose create Installer, not merge module (unless you want to package up dependencies for a subproject)
6) Pick the existing VB project to deploy
7) Under Files on right add any other files that aren't straight dependencies (documentation or other related files)
8) Under Build Menu -> Build Configuration change it to release.
9) Click File System, then Application Folder, change the default install folder to be <company name>\<app Name>
10) Right click and Delete unneeded/bad dependencies. For example MDAC.msm doesn't normally need to be deployed by the app.
11) Change ActiveX dlls to be self register in properties.
12) Under File System, User's Start Menu - Add folder hierarchy User's Start Menu -> Programs -> <company name> -> <app name>
13) Drag system created shortcut to app from User's Start Menu to the App Name folder. Rename as appropriate.
14) Add shortcut to user's desktop folder if desired
15) Add any other file shortcuts (say to documentation) in the App Name folder or user's desktop
16) Under User Interface, click all the leaf nodes (like the welcome screen) and change the banner bitmap if you have one.
17) Configure Project Properties as appropriate (I fill in support information and update version number)
Build -> Build
THe msi file will be created in a subfolder of the install folder.
Whenever you make a new exe you just open the existing visual studio installer project and choose build->build. It will create a new msi for you.