English 中文(简体)
wix custom dialog for config edit
原标题:

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.)

I tried to google but got nothing worked

Any help is greatly appreciated.

最佳回答

You ll need to do three things:

  1. Create a custom property:

    <Wix>
     <Product ...>
       <Property Id="SQLSERVER" /> ... 
     </Product>
    </Wix>
    
  2. Add a custom dialog to your Wix UI to capture the user input and store it to a property. This tutorial should help you with that.

  3. 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" />
    
问题回答

暂无回答




相关问题
3rd party Wix libraries

I am just getting started with Wix. I see there there a several libraries included with the default Wix install. I also see that users can create their own libraries(wixlibs). Are there any 3rd ...

Psake, Powershell & Wix

I have the below function as a part of my psake build. When the build is executing Candle.exe throws this error: candle.exe : warning CNDL1098: ext .BuildPackagesWixWebinWixIIsExtension.dll ...

wix custom dialog for config edit

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 ...

Closing an application using WiX

In creating my WiX installer I have run into an issue when trying to close an application before installing the upgrade. Below is an example of how I am attempting to do this. <util:...

Conditional uninstall of previous version in Wix

I m doing an installer for an software used for debugging embedded ARM cores (OpenOCD) and this installer automatically removes the previous versions - that s simple. However, sometimes that would be ...

热门标签