Jump to content


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.
Photo

Could I replace files in a MSI at run-time?


7 replies to this topic

simonlin

simonlin
  • Full Members
  • 9 posts

Posted 17 July 2006 - 14:04

Hi everybody,

I am working on making a tool that for users replacing/inserting some files in a MSI.
The MSI is made by IS12, and it seems like the copied files are compressed as a cab file and are put into Binary table as a binary stream.
I can extract the cab file from the MSI, but when I make a little change on the cab file and embaded the cab file into MSI, it will crash during installation.

I am not sure it is a good way to replace files in MSI like that.

I ever tried finding information from MSDN about MSI APIs but it seems no suitable API for replacing MSI files.
Did someone done it before and can give some hints?

Thanks,
Simon


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 17 July 2006 - 14:19

This is all wrong I am afraid. MSI is a deployment system. It is designed to install files and ensure that the files on disk are the same as those installed. If you want to replace files you shouldn't install them as part of a windows installer component, and if you do you should blank out the GUID for the component to tell MSI that the file installed by the component should not be checked for self repair nor updated via normal MSI rules.

What files are you trying to replace? You can make and admin image of a setup and change the files in the admin image and then install.
Regards
-Stein Åsmul

simonlin

simonlin
  • Full Members
  • 9 posts

Posted 17 July 2006 - 15:10

Thanks for your answer. It is a rare usage in our case. However, we still need it.

It is because both the tool and the MSI package are implemented by us, and we will continously update (by our method, not by MSI patch) some files that are in the MSI to our user. When the user receive the new files, he will using our tool to update the original MSI package, then deploy the MSI package to their users. The limit is that their users only accept a single MSI file.

Is it feasible to finish this kind of job?


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 17 July 2006 - 16:08

Why do you not want to use patches? This kind of scenario is exactly what it is for.
Regards
-Stein Åsmul

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 17 July 2006 - 16:09

Is the change limited to a few files only, or can the update be for any file?
Regards
-Stein Åsmul

simonlin

simonlin
  • Full Members
  • 9 posts

Posted 18 July 2006 - 08:20

We will update some files (a database) to our user everyday, and the user will also deploy these new files to sub-users. All of these jobs are done by a well-designed deployment/update protocol.

However, there are some sub-users does not connect to network. Therefore we are requested to implement a MSI file for our user. Then they can deploy the MSI package physically (maybe by CDROM) to the sub-users who cannot access network. But our update is frequent and we will not release MSI patches with these updates (the well-defined deployment protocol still not support it). Hence, the user want a tool to renew the MSI package with the newest file (database).


simonlin

simonlin
  • Full Members
  • 9 posts

Posted 18 July 2006 - 08:25

The only one file limitation is becuase the user also like to deploy the MSI package via AD to the sub-users who can connect to network. But the AD only support single file MSI.

Any advice on updating the MSI?



simonlin

simonlin
  • Full Members
  • 9 posts

Posted 20 July 2006 - 04:48

If doing this job by program is infeasible, is there any 3rd party tools can do this kind of job?