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?
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)
Please log in to answer
Posted by:
AngelD
18 years ago
Posted by:
EvilGlow
18 years ago
Posted by:
AngelD
18 years ago
Posted by:
francist
18 years ago
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.
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
18 years ago
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
18 years ago
Posted by:
AngelD
18 years ago
Posted by:
sikkert
18 years ago
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
18 years ago
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 ;)
"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
18 years ago
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.
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
18 years ago
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.
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
18 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.