cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
manisha81
Level 5

Replacing/updating cab file from MSI database using MS APIs

Hello,

I have a requirement to replace some file from a MSI database using MS Windows installer SDK. i cannot use any tool for this.

Steps followed to replace the file.
1. Openend the MSI dataabse.
2. Read a stream containing abc.cab.
3. Copied this stream on my local drive.
4. Extracted the abc.cab to abc folder (using CAB SDK).
5. replaced some files ( file statistics in the extracted folder.
6. Created a cab using CAB SDK. (But the cab size comes out to be smaller one as compared to one i have extracted from MSI database).
7. Now i wanted to link/use this updated cab in my MSI databaase.

I have tried these steps for doing this.

MsiCreateRecord(2);
MsiRecordSetString(hRecord, 1, "abc.cab");
MsiRecordSetStream(hRecord, 2, "c:\\abc.cab");
MsiViewModify(hView, MsiModify.Replace , hRecord) -- is giving me error - functionFailed.

i wanted to know the steps to acheieve the same.

Waht are the steps to replace an existing cab with the same cab but with different files packed in it.

Pls, help this is pretty urgent.

Thanks,
Labels (1)
0 Kudos
(3) Replies
manisha81
Level 5

Anyone any ideas ?
Robert, josh any ideas
0 Kudos
manisha81
Level 5

Any idea Robert and all???
0 Kudos
manisha81
Level 5

Installshiled Experts, any quots from you guys??
0 Kudos