This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Replacing/updating cab file from MSI database using MS APIs
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 26, 2011
06:09 AM
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,
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,
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 27, 2011
06:18 AM
Anyone any ideas ?
Robert, josh any ideas
Robert, josh any ideas
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 04, 2011
04:35 AM
Any idea Robert and all???
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 10, 2011
01:05 AM
Installshiled Experts, any quots from you guys??
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)