You can only add Temporary rows (and add temporary columns, I think) to existing tables from a CustomAction.
DONG LEE wrote: > Hi guys, > > So I am trying to edit MSI tables (component table, file table, ...) from a > custom action while the MSI is being run. > Following are the attempts I've made, and so far I have failed miserably. > And I am attempting this because > it needs to be customized after being shipped, in runtime based on > customer's computer settings. > > 1. MsiGetActiveDatabase() to get an active database of the installer. > 2. Use the following query string to open a view using > MsiDatabaseOpenView(). > "UPDATE `Component` SET `Component`.`Attributes`='SOME_CONSTANT WHERE > `Component`.`Component`=SOME_KEY_NAME" > 3. Execute the view using MsiViewExecute(), but I get a vague error of > ERROR_INSTALL_FAILURE from the function. > > I suspect that the error occured because the database was opened in > read-only mode since I > was trying to edit the MSI database that is being run. > > I used the same query string to attempt the same thing using WiRunSQL.vbs > script included in the installer SDK, and > it modified the record just fine. > > So is it possible at all to modify a database of a running MSI through a > custom action? > I've seen people using Wix SqlDatabase element as well as Wix SQL utility to > do some sql works. > Can I somehow use this to edit the database? And I can't use bootstrapper > because of the complications in digital signing in the lab. > Can I somehow use MsiRecord* api calls to achieve this? I wasn't sure if the > functions can modify the database > for the similar reason. > > Thanks!! > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users