/build/static/layout/Breadcrumb_cap_w.png

Replacing a file in a .msi package

Hello.
Can anybody tell me if it is possible (and how) to replace one file in an already created .msi package with some tool without InstallShield or Wise - let's say using some command line tool:
I have a package called InstallMe.msi and inside is a file file1.exe. I have a new version of this file (file1.exe) and I want to replace the old file with this new version - just binary replacement. If I open InstallMe.msi with Orca or IS I cannot do a replacement.

Thanks in advance
Andreo

0 Comments   [ + ] Show comments

Answers (8)

Posted by: nheim 16 years ago
10th Degree Black Belt
0
Hi Andreo,
do an admin installation.
Replace the file in the admin install point.
Recapture the CAB file with WiMakCab.vbs from the SDK.
Regards, Nick
Posted by: Coriolus 16 years ago
Orange Belt
0
Perhaps you can use MAKEMSI to make a new MSI. Use the before/after snapshot method. This kind of thing generally requires a tool that will allow you to remove the file and it's component and add a new file/component followed by recompressing the MSI. You could probably do it with WinINSTALL LE.
Posted by: nheim 16 years ago
10th Degree Black Belt
0
Hi Manny,
that's definitely not the best idea.
You should never recapture an MSI, if you can avoid it, because you are loosing all the intelligence, which is built into the installer.
Regards, Nick
Posted by: James 16 years ago
Senior Yellow Belt
0
This is possible using the Installer Design Studio tool by script logic. After opening the MSI with IDS select the 'IQ Views' tab and select the 'Files' option under the Files And Registry menu on the left hand side. In the lower half of the screen under project view simply browse through the files in the msi and delete the file you wish to remove. Then whilst still navigating through project view select the folder where you wish to put the new file. Now in the top half of the screen browse for the file or folder you wish to add and simply right click it and choose 'Add File'. This will add the new file to the msi and it will be copied to the location you selected in project view. Now save and exit and you msi will contain the new file :)

EDIT: I do not know of a command line tool to do what you are asking.
Posted by: nheim 16 years ago
10th Degree Black Belt
0
Hi Andreo,
answered a similar question just a few days ago.
See: http://itninja.com/question/nested-msi-with-custom-action-:-msp-file
for a more detailed description.
Regards, Nick
Posted by: jamsek19 16 years ago
Orange Senior Belt
0
Hello all.
Thanks for replays.
This is not as I want.
Usually I have a build process which makes a .msi package after c++ build. At the moment I have a customer, which wants to update just some files (after resolved bugs [;)]). Patch is not an option, I need just one file. Also new version of .msi package is not an option.
So, I thing that it can be nice if I can replace just those updated binaries in an already created .msi package - all GUID codes will remain the same, version also, etc. and a customer can run a repair to install updates.

Is this possible?

Thanks.
Posted by: nheim 16 years ago
10th Degree Black Belt
0
Hi Andreo,
my suggestion does exactly what you want.
You can even automate it with a few lines of batch.
The scenario on the link i gave above is about applying a service pack.
You just have to omit the SP applying task and copy your new file to the right folder.
All the other steps are the same.
Regards, Nick
Posted by: deploy.no 16 years ago
Orange Belt
0
Nick, patient as always :-) I'm impressed, where do you get all that energy?

Sorry to chime in late but maybe my suggestion from this thread would be useful? Nick seems to prefer keeping replacement files as cabs or binaries inside the transfrom to maintain everything in once place - while I tend to keep them separate as "baggage files" in the msi sourcedir. Either way works but sometimes it seems people understand this better if they get away by using JUST Orca and not also some "weird sdk commands" hehe.
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