在项目安装之前运行 Windows 窗体
我想在项目安装的设置向导启动之前运行 Windows 窗体。
我可以使用自定义操作并在安装阶段指定 Windows 窗体。
但它会在完成 2/3 的向导步骤后运行,并且安装会继续。
我想先运行我的表单,然后开始项目安装。
I want to run a windows form before the setup wizard for my project installation starts.
I can use a custom action and specify the windows form at the install stage.
But it runs after 2/3's of the wizard steps have been completed and installation continues.
I want to run my form first and then project installation starts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您在这里有几个选择,具体取决于您使用的安装程序:
1) 作为先决条件执行包含您的表单的应用程序。这应该适用于大多数安装人员。
2) 如果您使用第三方应用程序(例如 Installshield),您可以在该应用程序中重新创建表单并将其集成到安装的 UI 中,以便它出现在需要的地方。
3) 某些第三方安装程序(例如 Installshield)允许您在应用程序的特定时刻执行 .Net 代码,因此您可以利用此功能。
(我不是在推动 Installshield,它只是我使用过的唯一第三方安装程序)
I think that you have a couple of choices here, depending on the setup program that you are using:
1) Execute an application containing your form as a prerequisite. This should work for most installers.
2) If you are using a third party application such as Installshield, you could recreate the form in that application and integrate it into the UI of the installation so that it appears where needed.
3) Some third-party installers, such as Installshield, allow you to execute .Net code at specific junctures in the application, so you could utilize this functionality.
(I am NOT pushing Installshield, it's just the only third-party installer that I have worked with)
如果您使用的是 Visual Studio 安装项目,那么这就是问题所在。自定义操作在向导的最后阶段执行(注意 - 在将任何文件复制到系统之前)。使用此类安装程序无法获得所需的预期行为。
注意:如果您要启动的 Windows 窗体执行某种预先要求检查,则可以使用 MSI 安装程序。这将在向导的第一阶段发生。这可以通过使用启动条件来实现。
希望这能回答您的问题。
If you are using Visual studio setup project then this is the problem with it. Custom actions are executed in the last stage of the wizard ( Note - Before any files are copied to your system). You cannot get the expected behavior you want with this type of installer.
Note : If windows form that you want to launch does some kind of pre-req check, then that is possible with MSI installers. This will happen at the first stage of the wizard. That can be achieved using Launch conditions.
Hope this answers your question.