[wix-users] Dynamically change an attribute's value

Joseph L. Casale jcasale at activenetwerx.com
Mon Jul 10 12:30:51 PDT 2017


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
Of Nir Bar
Sent: Monday, July 10, 2017 9:00 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Dynamically change an attribute's value

> Yes, if you make sure to enter the same values on install, repair and uninstall
> you'll get what you need.

Hi Nir,
I mocked up an immediate CA scheduled in InstallExecuteSequence before CostFinalize
to have a look at this. Doing something along the following:

using (Database database = session.Database)
using (View view = database.OpenView("SELECT * FROM IIsWebApplication"))
{
    view.Execute();
    foreach (Record record in view)
    {
        view.Modify(ViewModifyMode.Delete, record);
        record["AppPool_"] = "WebAppPoolLocalSystem";
        view.Modify(ViewModifyMode.InsertTemporary, record);
    }
}

I can see that through logging all the rows on IIsWebApplication that the AppPool_ reference
certainly does change to another definition, yet the original AppPool still gets installed?

Any idea what I missed?
Thanks,
jlc



More information about the wix-users mailing list