Programmer
Programmer

Reputation: 400

Edit a file on IIS Manager by wix installer

My requirement is to edit a .xap file which is already in the IIS Manager.. when install another web application on IIS manager. (I want to add the end points of a web application in the previous web application .xap file)

Upvotes: 1

Views: 188

Answers (2)

Christopher Painter
Christopher Painter

Reputation: 55581

Please see Mike's answer over at:

NSIS Changing config file present in XAP file i.e. silverlight component build

There's two parts here:

1) Authoring the Silverlight application to use an external config file.

2) Authoring your installer to update that config file. In this case of WiX, it's the XmlConfig element in the Util extension.

The reasons for doing it this way is to have a highly reliable installer. If you write custom actions to extract, edit and compress the XAP you'll invalidate digital signatures and introduce complexity and fragility to your deployment process. Avoiding the temptation to do all this and just use XmlConfig gives you a robust, declarative installation that fully supports the Windows Installer rollback story.

Upvotes: 0

Rob Mensching
Rob Mensching

Reputation: 35866

You could write a custom action to:

  1. Open the .xap file (it's a .zip file named differently)
  2. Extract the file(s) that need to be modified
  3. Edit the extracted file(s)
  4. Re-zip the extracted file(s) back into the .xap file.

You could find the existing .xap file using AppSearch of some sort. Maybe a FileSearch element. Most of the work is going to be in your custom action though. Good luck!

Upvotes: 1

Related Questions