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??
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)
Please log in to answer
Posted by:
anonymous_9363
14 years ago
Posted by:
deranjer
14 years ago
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
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
14 years ago
Posted by:
cmi2000
14 years ago
Posted by:
deranjer
14 years ago
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...
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
14 years ago
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
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
14 years ago
Posted by:
deranjer
14 years ago
Posted by:
cmi2000
14 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.