/build/static/layout/Breadcrumb_cap_w.png

Making an Upgrade

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

Answers (12)

Posted by: AngelD 17 years ago
Red Belt
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.
Posted by: EvilGlow 17 years ago
Yellow Belt
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.
Posted by: AngelD 17 years ago
Red Belt
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.
Posted by: francist 17 years ago
Senior Yellow Belt
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.
Posted by: sikkert 17 years ago
Orange Senior Belt
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.
Posted by: AngelD 17 years ago
Red Belt
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.
Posted by: AngelD 17 years ago
Red Belt
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.
Posted by: sikkert 17 years ago
Orange Senior Belt
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.
Posted by: AngelD 17 years ago
Red Belt
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 ;)
Posted by: sikkert 17 years ago
Orange Senior Belt
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.
Posted by: francist 17 years ago
Senior Yellow Belt
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.
Posted by: sikkert 17 years ago
Orange Senior Belt
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ