vb6 activex 文档项目静默安装
我有一个 vb6 activex 文档项目,我需要创建一个无需任何用户界面和用户干预即可运行的 msi 包(这就是要求,因为它必须通过 Active Directory 进行部署)。我按照以下步骤操作:
我使用 Visual Studio 安装程序创建了一个 msi 项目,并删除了所有用户界面。手动将所有 vbd 文件添加到项目中,并编译它。当我运行 msi 时,它会在没有提示的情况下安装所有文件,但应用程序不会运行。
我使用包和部署向导创建了一个包,然后打开 vb pdw 项目的源代码,注释了所有消息框,并在需要时分配了默认值。然后编译setup.exe文件并用之前创建的安装包上的setup.exe复制/覆盖它。当我从像“setup.exe -s install.log”这样的命令提示符运行它时,它在没有提示的情况下安装了应用程序,运行良好。安装后应用程序运行良好。
因此,我决定使用 Visual Studio 2008 创建一个 msi 包,并添加上面创建的安装包(使用包和部署向导)。在自定义操作中,我将 setup.exe 设置为使用“-s install.log”参数运行。我需要一个保存应用程序路径的注册表项,因此我将其添加到注册表设置部分。
另一个要求是我需要在安装后运行另一个自解压的exe。该自解压程序将查看上述注册表项并提取(覆盖)应用程序路径上的文件。
因此,使用自定义操作,我将 update.exe 设置为在安装后运行。
现在,当我运行msi时,它运行良好,安装后运行update.exe,一切正常;但只是有时。我无法预测它何时有效,何时无效。当我在其他几台机器上尝试相同的 msi 时,它在某些机器上有效,但在其他机器上无效。 当我检查“添加或删除程序”时,有很多该应用程序的条目。
我在这个msi项目上挣扎了一段时间,现在感到很无助。我不知道我做错了什么。如果有人能指出我正确的方向,我将不胜感激。
还有其他方法可以在没有提示的情况下为 vb6 activex 文档项目创建安装包吗?
I have a vb6 activex document project and I need to create an msi package (thats what is the requirement since it has to be deployed thru active directory) that runs without any user interface and user intervention. I followed these steps:
I created an msi project using visual studio installer and removed all the user interfaces. Added all the vbd files manually to the project, compiled it. When I run the msi, it intalls all the files without prompts but the application doesn't run.
I created a package using package and deployment wizard, then opened the source code of vb pdw project, commented all the message boxes, assigned default values where required. Then compiled setup.exe file and copied/overwrote it with the setup.exe on the install package created earlier. When I run it from command prompt like this 'setup.exe -s install.log' it installed the application without prompts, works well. And the application runs well after installation.
So I decided to create an msi package using visual studio 2008 and added the above created install package (using package and deployment wizard). In custom action I set the setup.exe to run with '-s install.log' arguments. I need one registry entry that holds the App path, so I added it on the registry settings section.
Another requirement is I need to run another self-extracting exe after the installation. And that self-extractor will look at the above registry entry and extracts (overwrites) the file on the App path.
So using custom action, I set the update.exe to run after the installation.
Now, when I run the msi, it runs well, and after installation it runs the update.exe, everything works well; but only sometimes. I couldn't predict when it works and when it doesn't. When I tried the same msi on few other machines, it worked on some and not on others.
And when I checked the 'Add or Remove programs' there were many entries for this App.
I have been struggling with this msi project for a while and now I feel helpless. I don't know what I'm doing wrong. I would appreciate if anyone could point me in the right direction.
Any other way to create an install package for vb6 activex document project without prompts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这对我使用 MSI 安装 ActiveX dll 文档有用:
这个回复有点晚了,但我也为此苦苦挣扎了大约
一年后才能开始工作。关键似乎是注册ActiveX
在另一台 PC 上安装时,可以使用 exe 或 dll。以下内容对我有用;我只是
列出 dll 的步骤,因为使用 exe 仍然没有 100% 成功:
请务必使用安全的 VB 系统文件(从 http 下载其中的 zip 文件 [vb6sp6sys.zip] ://www.jrsoftware.org/iskb.php?vb) 代替那些
由 VB 的打包和部署向导生成。
Sub Main) 如下所示的代码部分。因为 Internet Explorer 是 ActiveX 文档的“容器”,所以这个小 exe 使用它的一个版本
(IE) 加载 UserDocument1.vbd,具体取决于您使用的操作系统。 Windows 7 和 Vista(我认为是 Vista)默认使用不同版本的 IE,它似乎不想运行 ActiveX 文档。但是,在他们的 Program Files (x86) 中,有一个 IE 版本 - 因此会测试 (x86) 文件夹是否存在;如果不是,则假定这是较低版本的 Windows 并使用普通 IE 运行。将此小可执行文件命名为“SilentStartUp_ByOS.exe”
DLL 的本机库和任何包含的 OCX。有免费版本
高级安装程序,但它没有此功能。
注意:可能还有其他安装包也可以执行此操作,但是
高级安装程序是我所知道的唯一一个。我是 Inno 粉丝,但不能
找到任何方法可以用 Inno 来做到这一点。
你的安装包。使用高级为 3. 中创建的 exe 分配图标
安装程序并使其成为启动程序的快捷方式。
为了绕过Win7上非常严格的安全问题
和 Vista,更不用说如果安装在公司内部网上了。
一切完成后,因为您的 dll 已注册,IE 应该能够
启动您的 ActiveX 文档。
代码:
This works for me using MSI to install an ActiveX dll document:
This reply is a bit late, but I also struggled with this for about
a year before getting it to work. The key seems to be in registering the ActiveX
exe or dll when installing on another PC. The following works for me; am only
listing steps for a dll as still haven't succeeded 100% with exes:
Be sure to use the safe VB system files (download a zip file [vb6sp6sys.zip] of them from http://www.jrsoftware.org/iskb.php?vb) in place of those
generated by VB's Package and Deployment wizard.
Sub Main) shown below in the code section. Because Internet Explorer is the "container" for your ActiveX document, this little exe uses a version of it
(IE) to load your UserDocument1.vbd, DEPENDING ON WHICH OS you are using. Windows 7 and, I assume Vista, use a different version of IE by default, which doesn't seem to want to run an ActiveX document. But, in their Program Files (x86) there is a version of IE that will - hence the test on whether the (x86) folder exists or not; if not it assumes this is a lower version of Windows and runs using the normal IE. Call this small executable something like "SilentStartUp_ByOS.exe"
the native library of your DLL and any included OCXs. There is a free version
of Advanced Installer, but it doesn't have this capability.
Note: There may be other installation packages that will do this also, but
Advanced Installer is the only one I know about. I'm an Inno fan, but couldn't
find any way to do this with Inno.
your Install package. Assign an icon to the exe created in 3. using Advanced
Installer and make it a shortcut to start your program.
for the sake of bypassing Security issues which are very strict on Win7
and Vista, not to mention if installed on a company intranet.
When all is done, because your dll was registered, IE should be able
to start up your ActiveX document.
Code: