[wix-users] Update ActionText table in MSI DB using Immediate CA before LaunchConditions
rob at firegiant.com
Tue Jul 24 08:46:32 PDT 2018
IIRC, you can't remove values in Custom Action, only add them.
Short replies here. Complete answers over there: http://www.firegiant.com/
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.".
using (Database db = session.Database)
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);
using (Record record = view.Fetch())
record.SetString("Description", " ");
view.Modify(ViewModifyMode.Assign, record); //error here
//view.Update(record); // this is also not working
Can anyone please help?
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users