I want to change the way Features are displayed in the Feature Tree View dialog at install time depending on the configuration of the system. I though I could do the following:
hDataBase = MsiGetActiveDatabase(ISMSI_HANDLE);
szQuery = "UPDATE Feature SET Feature.Display=12 WHERE Feature.Feature='Database'";
retval = MsiDatabaseOpenView ( hDataBase , szQuery , hView );
retval = MsiViewExecute ( hView , hRecord );
MsiCloseHandle(hView);
retval = MsiDatabaseCommit(hDataBase);
Sometimes this seems to work, then it doesn't mostly. The MsiViewExecute returns 1627.
I have added
hError = MsiGetLastErrorRecord();
nvBufferSize = 255;
retval = MsiRecordGetString ( hError , 1 , svValue , nvBufferSize );
WHich returns 2259 update failed.
The 12 in the Display=12 is just for testing. What am I doing wrong?
Any help would be appreciated.
Tom Richards
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Feature Display Level
Started by
tomr
, Oct 26 2004 17:07
4 replies to this topic
Posted 27 October 2004 - 07:07
What project type are you using?
Stefan Krüger
InstallSite.org twitter facebook
Posted 27 October 2004 - 14:47
This is a DevStudio 9, InstallScript MSI project.
Note that I can do a Select from the Feature table and get the current Display field, it fails when I try to update it.
Note that I can do a Select from the Feature table and get the current Display field, it fails when I try to update it.
Posted 28 October 2004 - 09:09
Moving question to InstallScript MSI forum
Stefan Krüger
InstallSite.org twitter facebook
Posted 28 October 2004 - 09:11
I'm not sure if InstallScript MSI actually uses these settings from the MSI database at all.
Anyway, in general you cannot modify records that are stored in the MSI file. All you can do in a custom action is add temporary rows (these can be modified and deleted).
Anyway, in general you cannot modify records that are stored in the MSI file. All you can do in a custom action is add temporary rows (these can be modified and deleted).
Stefan Krüger
InstallSite.org twitter facebook