[wix-users] Update ActionText table in MSI DB using Immediate CA before LaunchConditions

Ven H venh.123 at gmail.com
Wed Jul 25 00:33:13 PDT 2018


Thank you very much, Rob.

Regards,
Venkatesh

On Tue, Jul 24, 2018 at 9:16 PM, Rob Mensching via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> IIRC, you can't remove values in Custom Action, only add them.
>
> _____________________________________________________________
>  Short replies here. Complete answers over there:
> http://www.firegiant.com/
>
> -----Original Message-----
> From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Ven
> H via wix-users
> Sent: Tuesday, July 24, 2018 5:46 AM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Cc: Ven H <venh.123 at gmail.com>
> Subject: [wix-users] Update ActionText table in MSI DB using Immediate CA
> before LaunchConditions
>
> I need to clear out the Description column values for some of the actions
> from the ActionText table in the msi db. For this, I created an Immediate
> CA to be triggered before Launch Conditions. I followed the links below to
> do the update with the below code, but I am not able to get it working. I
> keep getting the error, "Function failed during execution.".
>
> https://stackoverflow.com/questions/27604823/updating-table-in-msi-file
>
> https://stackoverflow.com/questions/19252620/how-to-
> change-productcode-using-microsoft-deployment-windowsinstaller
>
> using (Database db = session.Database)
>                 {
>                     if (db.Tables.Contains("ActionText"))
>                     {
>                         string actionName = "Name of the Builtin Action";
>                             //db.Execute("UPDATE ActionText SET
> Description = '' WHERE Action = '" + actionName+ "'"); // not working
>
>                             string query = "SELECT * FROM ActionText WHERE
> Action = '" + actionName + "'";
>                             View view = db.OpenView(query);
>                             view.Execute();
>                             using (Record record = view.Fetch())
>                             {
>                                 record.SetString("Description", " ");
>                                 view.Modify(ViewModifyMode.Assign,
> record); //error here
>                                 db.Commit();
>                                 //view.Update(record); // this is also not
> working
>                                 //view.Close();
>                             }
>                        }
>                    }
>
> Can anyone please help?
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list