Hi ...

I need to upgrade a file in a package which is installed thru a mst.
I have x.msi with x.mst and it installs file x.txt along with the other files in x.msi. I need to make another msi (y.msi) which will install another file named x.txt (same name, other context).
If i put only the new x.txt file in y.msi, when x.msi is repaired the file is overwriten (dah[8|]).

What must i do?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
If this was a fix I would rather create a patch (MSP) instead.

The x.msi shouldn't overwrite the file due to the modified date should be older then the file in the y.msi package.
Answered 06/08/2006 by: AngelD
Red Belt

Please log in to comment
0
i tried that too, but the file that i want to overwrite is in the MST and the MSP does not look for it there. That's why i need another solution.
Answered 06/09/2006 by: EvilGlow
Yellow Belt

Please log in to comment
0
What distribution solution are you using.
Should it be SMS could you use a script that will replace the MST and then run "msiexec.exe /fomusv <ProductCode> /qb!"
to reinstall the application with the new transform.
Answered 06/09/2006 by: AngelD
Red Belt

Please log in to comment
0
Create your y.msi as an upgrade to x.msi and either include the revised file as part of y.msi or within a new 'transform'.

Depending on what tools you are using, creating an upgrade should be very easy. If the file is unversioned and the modified date of the file on the PC is > creation date, then you will need to force the file down by adding a version number in the file table.
Answered 06/12/2006 by: francist
Senior Yellow Belt

Please log in to comment
0
i tried that too, but the file that i want to overwrite is in the MST and the MSP does not look for it there.

A patch will NEVER overwrite a file in any msi/mst, it will only overwrite the installed files.
In this case, the installer should create a "sequence" of the installation. First, the msi/mst should be bundled together to make an installation. Then, the patch should be applied onto this bundle. Now that the installer got the sequence in order, it will start installing files. Since the patch contains newer files than the mst, the resulting installation should contain the files from the patch.

Also, as AngelD says, since the date of the file in the patch is newer, the patch should take precedence.
Answered 06/12/2006 by: sikkert
Orange Senior Belt

Please log in to comment
0
A patch will NEVER overwrite a file in any msi/mst, it will only overwrite the installed files.
Well not all true.

If you apply the patch with the command line: "msiexec /p patch.msp REINSTALL=ALL REINSTALLMODE=omus" this will also update the cached msi.
Answered 06/13/2006 by: AngelD
Red Belt

Please log in to comment
0
Just to verify about the date on the x.txt file. Can a user modify this file from the x.msi?
In that case the date may be newer then the x.txt file that you want to replace with.
Answered 06/13/2006 by: AngelD
Red Belt

Please log in to comment
0
ORIGINAL: AngelD

A patch will NEVER overwrite a file in any msi/mst, it will only overwrite the installed files.
Well not all true.

If you apply the patch with the command line: "msiexec /p patch.msp REINSTALL=ALL REINSTALLMODE=omus" this will also update the cached msi.


What do you mean by "update the cached msi"?
The Windows Installer database will save a list of patches that should be applied to the installation, but I thought that should be saved in the registry, not in the cached msi. Also, the cached msi does not contain any files, so the patch cannot update any files there.

I still belive my original post is true. A patch will never update files in the original msi. The update will happen during the installation, but then only the installed files will be updated, not the files in the msi. The same happens with mst files. They contain changes to the msi, maybe even files, but a transform will never change the msi itself, it will only change the installation.
Answered 06/13/2006 by: sikkert
Orange Senior Belt

Please log in to comment
0
You're correct sikkert,

"REINSTALL=ALL REINSTALLMODE=omus" will only make sure that the files will be reinstalled from the patch source instead of the msi source.

Like sikkert stated, the msi & mst will be intact and not changed by the patch.


Don't know what I was thinking of when I wrote the above statement ;)
Answered 06/13/2006 by: AngelD
Red Belt

Please log in to comment
0
AngelD:
heh, you confused me there, I didn't understand what you ment :)

As for the original post:
you must either create a patch with the new x.txt file, or a new y.msi file, containing everything you got in the x.msi/x.mst file, but with the new x.txt file. Creating a new msi file with just the new x.txt will, as you say, be overwritten if the original x.msi is repaired.

How this is done will vary a little depending on the tool you're using, but the main points that I would do, is this:

- make a copy of original x.msi/x.mst, and name them y.msi/y.mst
- change x.txt in new y.mst
- change Package Code in new y.mst
- either
a) create a patch between the 2 new packages
or
b) change Product Version and Product Code in y.mst, and make it an upgrade of x.msi/x.mst, so that installing y.msi/y.mst will automatically uninstall x.msi/x.mst.

I would try to go with a) here, since it would be more "correct" according to the Microsoft recommended guidelines for patches and upgrades. But both options can be used.
For how to create a patch or upgrade, I suggest you consult the documentation for your package tools, or make a new post here, where you spesify your tools and what you want to do.
Answered 06/13/2006 by: sikkert
Orange Senior Belt

Please log in to comment
0
I didn't think that you can just change the Product Code in a transform unless it's used as an 'instance' transform.

For an upgrade to work, y.msi must have a different Product Code to x.msi and must have an entry in the Upgrade table containing the Upgrade Code for x.msi. It would be better to put the new file in y.msi, rather than add it via a transform in my opinion.
Answered 06/13/2006 by: francist
Senior Yellow Belt

Please log in to comment
0
I don't know about the product code, you might be right there.
As for putting the file directly in the msi, if the msi is delivered by the maker of the application, then editing that msi directly is not a good idea.
It would be better to use a patch here, I think.
Answered 06/13/2006 by: sikkert
Orange Senior Belt

Please log in to comment
Answer this question or Comment on this question for clarity