/build/static/layout/Breadcrumb_cap_w.png

Replacing files during install

Hi,
I'm building a package about a new feature of an application installed as a prereq.
Example: to Install the application MyApp on C:\Program Files\MyApp, then to install the new feature on C:\Program Files\MyApp

The point is that, I have to replace some dll files from c:\Program Files\MyApp with files included in the new feature with diferent version
Example:
replace C:\Program Files\MyApp\file.dll (version 3.5) with file.dll (version 3.2)

To do that, I wrote on RemoveFile table:

FileKey Component_ Filename DirPropierty InstallMode
file file.dll123 file.dll INSTALLDIR 1

But It doesn't works!

I verbose a log file and I found :
Component: file.dll123; Installed:absent; request:Local ; Action:Null

Why it's looking for the component? Obviously the component doesn't exists before the installation, but the file yes!

Any ideas??

0 Comments   [ + ] Show comments

Answers (9)

Posted by: anonymous_9363 13 years ago
Red Belt
0
You should be authoring an upgrade. Check out MSDN for details on the Upgrade table, if you're editing tables by hand. The two major authoring tools, Wise and InstallShield, make upgrade authoring a breeze.
Posted by: deranjer 13 years ago
Senior Yellow Belt
0
Even if they add the neccessary entry to the upgrade table, won't the file version still make it so that the file is not replaced? Or does the manual entry in the RemoveFile table force removal no matter what the version?

It appears to me he is trying to replace a "newer" 3.5 version with an "older" 3.2 version.

And was the RemoveFile entry in the old msi, or the new one... that could make a difference.. I think? :P
Posted by: anonymous_9363 13 years ago
Red Belt
0
There I go, scan-reading again! I did read the post but, in my cell-damaged brain, understood the requirement to be replacing 3.2 with 3.5. Perhaps the OP can definitively put me right?
Posted by: cmi2000 13 years ago
Senior Purple Belt
0
let me explain, here we go!
deranjer is right, I put the entry manually in the RemoveFile table to replace the newer with the older, and it was in the new msi. I can't to modify the old msi, it just installed...
Posted by: deranjer 13 years ago
Senior Yellow Belt
0
Then this could get tricky for two reasons:

1. I am not sure you can use the RemoveFile Table in the new .msi to remove files from an old msi... maybe you can I have just never ran into that scenario. (Maybe if the InstallMode=1 or 3 it will remove the same named file? Not entirely sure..)

2. It also becomes tricky trying to replace the new .dll with the old one... I ran into this issue before with some stupid program I was packaging and just manually revved the version to a higher version and I believe that worked... of course when that program revs again... idk how that will work.

There should be a way to force it to install the "old" .dll no matter what... I cant think of a simple way off the top of my head. If worse comes to worse just write a custom action that remove the .dll manually.

Take a look at the RemoveFile table for the old .msi.. maybe the installmode is set to 2... then when you edit the upgrade table it might uninstall it entirely then reinstall it...
Posted by: cmi2000 13 years ago
Senior Purple Belt
0
I'll try to change the InstallMode to 3... I'm not sure about this but just to try... I thought that you can to remove files existing before the installation through RemoveFile table, seemingly isn't in that way :-(

I was evading to do a custom action, but if it's the only way....

I'll let you know about the result
Posted by: cygan 13 years ago
Fifth Degree Brown Belt
0
why are you even thinking of using the remove file table

my suggestions will be to use companion files or use the REINSTALLMODE property

REINSTALLMODE=amus
Posted by: deranjer 13 years ago
Senior Yellow Belt
0
Well that does make sense... unless the OP does not want to remove other files/registry settings if the file hashes match... but that shouldn't be too big a deal...

Thanks, didn't know about this option till now.
Posted by: cmi2000 13 years ago
Senior Purple Belt
0
Hi Cygan!
To use the remove file table was the first thing tha came to my head, and I hadn't heard about the REINSTALLMODE property.
It did the job!
Thank you!
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