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

Patch before installing


5 replies to this topic

sirkkeli

sirkkeli
  • Members
  • 10 posts

Posted 06 May 2005 - 07:03

Hi!

Is it possible to patch a .msi package before it has been installed? I have to include two files to package after it has been created. Please help me!

Sirkkeli

mandy

mandy
  • Members
  • 121 posts

Posted 17 May 2005 - 15:23

I'm struggling to understand why you want to do some of the things you're enquiring about... why don't you just edit the MSI and add the new files?

But you can create a patched admin image of an MSI which results in an MSI containing the updates provided by the patch.

You can also install an MSI and a patch together at the same time using a single command line to achieve a similar result.

Alternatively, you can use a transform to add the files.


sirkkeli

sirkkeli
  • Members
  • 10 posts

Posted 17 May 2005 - 19:50

I know this is weird but I'll explain a bit more. I make a .msi package with InstallShield 10.5, but I can't include one file to package what contains i.a. installing information which is edited by a third person. All files should be in one .msi because of SMS server.

The third person doesn't know anything about .msi and isn't able to use InstallShield, so there should be some method to add one file to .msi by very simple way by using free tools. I have tried MAKEMSI and ORCA but I just managed to edit tables but not to add the additional file to .msi. I think that there are at least two solutions to my problem:

1. To include additional file somehow to .msi package. I can also make a "dummy" file to .msi which could somehow be replaced with the correct one.

2. To make a patch from additional image and add it into admin package (Thanks mandy!) of .msi and then send it to end-users. Making the patch should also be used from command line with a script.

The biggest problem is that I don't know how to make either solution. sad.gif

I hope this will explain more about my problems!

Thanks, Heikki

mandy

mandy
  • Members
  • 121 posts

Posted 17 May 2005 - 21:19

You could write a script to add the file using Windows installer automation.

Unfortunately, I don't have a ready-made example and I can't justify spending time writing one for free. Maybe somebody else has an example of this?

If you want to have a go yourself, the following link should put you on the right track:

http://msdn.microsof...nstallation.asp



_nick_

_nick_
  • Members
  • 34 posts

Posted 18 May 2005 - 17:17

Correct me if I am wrong but this is the scenario you have:

1) You create an MSI file: Installer.msi.
2) A third party has two files File A and File B which need to be included in the install and may change independantly of the installer.
3) The third party that creates files A and B and yourself upload these files to the server
4) When the user runs Installer.msi, in addition to installing the files and running the actions you specify, you would like it to additionally install files A and B

If you impose fairly strict regulations on the number of files and placement on disk you can accomplish this with an external cab.

Set up your Installer excatly as you do now, but include DummyA.txt and DummyB.txt in a an external cab with Keys IncludeA and IncludeB. DummyA.txt and DummyB.txt should be installed to the location you want the real files to be placed.

Then the third party can create a .cab file that matches the cab file created by you, except that instead of DummyA.txt and DummyB.txt being packaged, the real files are packaged. This way you can update the MSI and the third party can update the cab file seperately and everything *should* work. File versioning may not work with this, and you will have to make sure that the .cab file gets distributed with the MSI.

sirkkeli

sirkkeli
  • Members
  • 10 posts

Posted 19 May 2005 - 10:26

Thanks!

I made a .cab file which included two dummy files. Then I made another .cab file with same filename and included there the "real" files. I tried to replace .cab file in msi with msidb.exe, but dummy files didn't get updated. Is there any better software to do the update or do I use invalid command-line switches (msidb.exe -d mymsi.msi -a cabinet.cab)

- Heikki