[Incident]: Some users report they are unable to access the case portal. Please see this community notice for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
eladef
Level 7

Set the Feature Required at runtime

Hi

In Basic MSI project I'm trying to set the Feature Required field at run time using this code.
I can successfully set the Display and Title but it seems it has no affect on the Required, Any ideas ?

hDB = MsiGetActiveDatabase(hMSI);
MsiDatabaseOpenView(hDB,"SELECT * FROM `Feature` WHERE `Feature`= '" + FeatureName + "'", hView);
MsiViewExecute(hView, 0);
MsiViewFetch(hView, hRecord);
nBuff = 256;
MsiViewModify(hView, 6, hRecord); // 6 = delete
nResult = MsiRecordSetInteger(hRecord, 8, 16);
MsiViewModify(hView, 7, hRecord); // 7 = insert temp

MsiViewClose(hView);
MsiCloseHandle(hRecord);
MsiCloseHandle(hView);
Labels (1)
0 Kudos
1 Reply
eladef
Level 7

Is there a workarounf for it ?
0 Kudos