- Revenera Community
- :
- InstallShield
- :
- InstallShield Knowledge Base
- :
- Always Overwrite Files Regardless of Version, Date, and Time Stamp
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Always Overwrite Files Regardless of Version, Date, and Time Stamp
Always Overwrite Files Regardless of Version, Date, and Time Stamp
Summary
This article discusses how to always overwrite files in InstallShield Express.Synopsis
This article discusses how to always overwrite files in InstallShield Express.
Discussion
InstallShield 12 Express and earlier
The recommended method for forcing files to be overwritten is to use the Always Overwrite property. Follow these steps:
- Navigate to the Files view under the Specify Application Data.
- Find the files that you always want to overwrite existing files.
- Right-click the file and choose properties from the menu options.
- Select the Advanced tab.
- Select the Always OverWrite radio button.
- Click OK.
InstallShield Express 5.0 and Earlier
The Windows Installer Service also provides the REINSTALLMODE property. This property can be set to various command-line arguments to control how files are installed on the machine. However, by using this property it will force all files in the setup to overwrite existing files. This property should be used carefully. This property can be used in place of the method described above but is not recommended.
To always overwrite files using the REINSTALLMODE property, you must set the REINSTALLMODE property to 'amus', where 'a' refers to always overwriting, 'm' and 'u' refer to rewriting all registry data, and 's' refers to rewriting shortcuts. For more options that can be passed to REINSTALLMODE, refer to the Additional Information section of this article.
Setting the REINSTALLMODE property in your setup
- You can pass the property REINSTALLMODE=amus to the installation via the following command-line parameters:
MsiExec.exe /I project.msi REINSTALLMODE=amus
Setup.exe /V" REINSTALLMODE=amus"
- To automate the process, you can pass the property REINSTALLMODE=amus in the Setup.ini file. This way when setup.exe is launched, these parameters are passed to the MSI package automatically for you. Follow these steps to specify this parameter in the Setup.ini file:
- Open the Disk1 folder under the Release location to locate the setup.ini file. The Release location can be found by selecting Tools > Options in the Express IDE. On the File Location tab in the Options dialog, note the Project Location field.
- Open the setup.ini file from the respective folder using Notepad.
- Under the [Startup] section in the setup.ini file, set the CmdLine t
CmdLine = REINSTALLMODE=amus
- Save the setup.ini file and burn your setup CD or deploy your setup files.
If using the SingleImage compressed option
If building the release with the SingleImage compressed option, you will not see the Setup.ini file in the release location, as it is compressed inside the setup.exe file. To work around this, you can set the Setup.ini file found in the Support directory to incorporate the above command-line arguments. Follow these steps to accomplish this:
- Go to <DRIVE>\Program Files\InstallShield\Express\Support and locate the Setup.ini file.
- Under the [Startup] section in the setup.ini file, set the CmdLine t
CmdLine = REINSTALLMODE=amus
- Save the changes made to the Setup.ini file and rebuild your compressed release to ensure that these changes are included in the setup, as this updated setup.ini file will be included in the setup.exe file.
- After deploying your release, be sure to revert the Setup.ini file in the <DRIVE>\Program Files\InstallShield\Express\Support location back to its original state, i.e., delete the changes made to the Setup.ini file.
<DRIVE> in the paths specified above should be replaced by the drive letter where Express is installed on the machine. e.g., C:\, D:\, etc. - Open the Disk1 folder under the Release location to locate the setup.ini file. The Release location can be found by selecting Tools > Options in the Express IDE. On the File Location tab in the Options dialog, note the Project Location field.
Related KB Articles
Q105988Q108003
Q105223
Additional Information
In Express 3.5 through 5.0, you can set the REINSTALLMODE property via a VBScript custom action. For more information on setting properties via VBScript custom actions, refer to Knowledge Base article Q108003 HOWTO: Setting or Getting the Value of a Property Via a VBScript Custom Action.
All the possible values that can be set to the REINSTALLMODE property are as follows:
Code or Value | Description |
---|---|
p | Reinstalls only if file(s) is missing (similar to Never Overwrite). |
o | Reinstalls if the file is missing or is an older version. |
e | Reinstalls if the file is missing or if an equal or older version is present. |
d | Reinstalls if the file is missing and if a different version is present. |
c | Reinstalls if the file is missing or corrupt. This is a repair option. |
a | Forces a reinstall of all files regardless of version, time, or date stamp check. |
u | Rewrites all registry keys being created under HKEY_CURRENT_USER or HKEY_USERS. |
m | Rewrites all registry keys being created under HKEY_LOCAL_MACHINE or HKEY_CLASSES_ROOT. |
s | Reinstalls all shortcuts and recaches icons overwriting any existing icons. |
v | This switch forces the installation to ignore the cached MSI package on the machine and recache the new package being run. This should only be used in an upgrade and not with a first-time installation. |
The above information can be found in the MSI Help Library topic REINSTALLMODE Property.
Following articles discuss REINSTALLMODE property in some details:
- Q105223 INFO: Sending a Minor Upgrade to an Existing Product Without Uninstalling/Reinstalling