wix用于配置编辑的自定义对话框 [英] wix custom dialog for config edit

查看:122
本文介绍了wix用于配置编辑的自定义对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用wix v3
为我的应用程序设置msi我有关于此任务的问题;
我需要一个用户输入,它将存储在我的应用程序的配置文件
中(例如我需要一个sql连接字符串的对话框,用户输入将被写入应用程序配置文件。)

hi i'm trying make a setup msi for my application with wix v3 I have a problem about this task; I need a user input that will be stored in my application's config file (for example i need a dialog for sql connection string and the user input will be written in application config file.)

我尝试google但没有工作

I tried to google but got nothing worked

任何帮助都非常感谢。

推荐答案

你需要做三件事:


  1. 创建自定义属性:

  1. Create a custom property:

<Wix>
 <Product ...>
   <Property Id="SQLSERVER" /> ... 
 </Product>
</Wix>


  • 将自定义对话框添加到您的Wix UI中,以捕获用户输入并将其存储到属性。此教程应该可以帮助您。

    在安装web.config文件的组件中,使用XmlFile元素更新您的web.config,属性值:

    In the component that installs your web.config file, use the XmlFile element to update your web.config with the value of your property:

     <util:XmlFile Id="UpdateConnectionStringInConfigSection" File="[ROOT_DRIVE]inetpub/wwwroot/$(var.ProductName)/web.config" Action="setValue" ElementPath="/configuration/connectionStrings/add[\[]@name=&quot;ConnectionString&quot;[\]]/@connectionString" Value="[SQLSERVER]" Permanent="yes" />
    


  • 这篇关于wix用于配置编辑的自定义对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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