View Full Version : Always Overwrite Files Option needed for Windows Installer
05-02-2006, 12:29 PM
There needs to be an "Always Overwrite" files option in components for Windows Installer.
The "Never Overwrite - Yes/No" option does not have any provide anything for always overwriting the file.
If this is not possible for Windows Installer, then how do we set a component to "Always Overwrite"?
05-02-2006, 12:43 PM
To specify that an individual file should always be overwritten, right-click the file in the Files and Folders view and click Properties. The Properties dialog box has an Always Overwrite check box. By default, this check box is not selected.
(You can also access an individual file's properties through the Components view or the Setup Design view: expand the node of the component that contains the file, and click the Files node. The files are displayed on the right.)
I hope that helps.
05-02-2006, 03:22 PM
Is there a way to set all files, and all files in all the subdirectories, at once to "Always Overwrite" without having to select the files one by one?
I can do a select all (ctrl-A) and change all the properties, but then I have to go into each subdirectory and do the same for each file in the subdirectories.
There really should be a way do this for all files and subdirectories using just one switch without having to do this for each individual file, and without having to go into each folder and set the files..
05-02-2006, 06:00 PM
If you want *ALL* files then you can change the ReinstallMode property from OMUS to AMUS. If you still want standard OMUS behavior but you just want to quickly set a lot of files ( but not all files ) to overwrite then you can use the direct editor to do a mass update to the file table ( Version column ). All the "Always Overwrite" really does is set the the file version to something like 65535.65535.65535.65535 so that FileCosting always *THINKS* that the current package has a newer version to install.
05-03-2006, 09:42 AM
but AMUS may roll back system (or common) files to older versions than were installed prior to the package being installed.
Setting the version number to 188.8.131.52 will have the same effect for unversioned files (as versions beat no-versions).
For versioned files, the version should always be updated when the file is updated. If it is not the case, you should get the developer to update the files when they have changed. There are plenty of freeware apps that can change the version resource if they refuse.
The versioning rules in MSI are there for very good reasons. It is simply not acceptable to try to force it to do otherwise.
Generally the best-bet is to use companion files for this purpose
05-03-2006, 10:05 AM
I understand the version rules, but there are scenarios where you don't have any choice.
Take repackaging for example....
An outside company ( who you can't tell the developers what to do ) are using a legacy install program with "always overwrite". Perhaps they were writing their software in Powerbuilder ( which doesn't let you brand the EXE or DLL's with a version number other then the version # of powerbuilder used to do the compile ) or are otherwise not updating their version resources.
Should I *REALLY* update their resources before doing the build or should I just take advantage of the `fake` alwaysoverwrite ( 65535.65535.65535 ) and move on?
The version rules are good, but they aren't perfect...
05-03-2006, 10:10 AM
So are you all saying... if my company is using versioning with say Visual Basic, and I use that AMUS option, the version will get changed in the files?
05-03-2006, 10:12 AM
No, with AMUS the version of the prexisting file will be ignored and the source file will ALWAYS overwrite the destination file.
Dangerous setting frankly but useful in certain situations.
05-03-2006, 10:16 AM
furthermore if your company is using versioning with say Visual Basic then the files will all be upgraded as necessary so long as you follow the MSI rules by making them all keypaths in separate components.
05-03-2006, 10:19 AM
You would be sad to know how many development teams have thrown builds over the wall to me and not bothered to update the version number.
05-03-2006, 10:21 AM
So where or how do I set the AMUS property? I don't see it any fields under components or features.
05-03-2006, 10:23 AM
It's a property so you define a property in the property manager ( property table ). You name the property REINSTALLMODE and you set it to AMUS By not defining it you have implicitly defined it as OMUS ( default ).
Do so at your own risk though. I'd rather leave it at OMUS and go through the file table and set the AlwaysOverwrite on just the files that I know I want to overwrite.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.