用于 SQL 数据库安装的 Wix 自定义 UI [英] Wix custom UI for SQL Database installation

查看:25
本文介绍了用于 SQL 数据库安装的 Wix 自定义 UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的第一个 wix 项目.我下载了 wix 3.6 rc.我的安装项目包括 2 个 wcf 和 1 个 silverlight 项目.使用默认的 Wix UI 一切正常.但是现在我需要向其中添加 sql 数据库.它适用于如下默认值:

This is my very first wix project. I downloaded wix 3.6 rc. My installation project includes 2 wcf and 1 silverlight projects. Everything works fine with default Wix UI. But now that I need to add sql database to it. It works fine with default values like below:

                  <Component Id='SqlComponent' Guid='8B72C159-1477-4A58-AFAE-E94D756BFFA6'>
                    <CreateFolder/>
                    <sql:SqlDatabase Id='SqlDatabase' Database='master' Server='.'
                      CreateOnInstall='yes' DropOnUninstall='no' ContinueOnError='yes'>
                      <sql:SqlScript Id='CreateTable' BinaryKey='CreateTable' ExecuteOnInstall='yes' />
                      <sql:SqlScript Id='CreateTable1' BinaryKey='CreateTable1' ExecuteOnInstall='yes' />
                    </sql:SqlDatabase>
                  </Component>

但是我需要为sql数据库路径,数据库名称,用户名和密码提供一个用户界面,如果没有指定用户和密码,则使用windows用户.

But I need to present a user interface for sql database path, database name, user name and password, if user and password is not specified then use windows user.

只是为了了解如何添加自定义用户界面,我尝试了以下操作:但它会立即显示自定义 ui.但我希望它只显示专门用于 sql 数据库安装.

Just to see how to add a custom ui I tried the following: but it displays the custom ui right away. But I want it to show specifically for sql database installation only.

<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes">
  <Text>Ready to Install</Text>
</Control>

<Control Id="Install" Type="PushButton" X="304" Y="243" Width="56" Height="17"
    Default="yes" Text="Install">
  <Publish Event="EndDialog" Value="Return" />
</Control>

我想,一旦我让它在我想要的位置准确显示自定义 UI,我的下一个要求将能够获取用户输入的数据库路径、名称、用户和密码,并将该信息传递给脚本.我也不知道该怎么做.

I guess, once I get it to show the custom UI exactly where I want, my next requirement is going to be able to get user input for database path, name, user and password and pass that information to the script. I'm not sure how to do that either.

推荐答案

最后我在这里找到了一篇关于 wix 的令人大开眼界的文章 如何添加自定义 UI

Finally I found an eye opener article on wix here How to add custom UI

经过长时间的努力了解 wix 的工作原理后,上面指向 codeproject 的链接帮助我理解了.尤其是解释创建 UI 的部分(那篇文章中的 MyWebUI.wxs)是救命稻草.

After a long struggle to understand how wix works, the above link to codeproject helped me understand. Especially the part that explains creating UI (MyWebUI.wxs in that article) was the life saver.

这篇关于用于 SQL 数据库安装的 Wix 自定义 UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆