cancel
Showing results for 
Search instead for 
Did you mean: 
eladef
Flexera beginner

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
Flexera beginner

Did someine faced this problem ?

Is there a workarounf for it ?
0 Kudos