MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Don't Repair Resources[Next]: Never Uninstall Resources
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Windows Installer FAQ (the basics)->Resource Life Cycle->Never Overwrite Existing Resources

Never Overwrite Existing Resources

The main choices are:

  1. The resources are members of a component, and a component has attributes including the "NeverOverwrite" flag.

  2. The resources are members of a component, these have conditions associated with them which you may be able to set, for example you could use a custom action or RegistryRead or FileFind (not so easy) commands to search for the resource and use the resulting property in the condition.

  3. One or more custom actions to perform all the update and removal logic.

EXAMPLE - Environment Variable

<$Component "ENVVAR_SOMEVAR" Condition=^%ENVVAR_SOMEVAR = ""^ Directory_="<$AnyDir>" LM="Y">
   <$Environment NAME="SOMEVAR" VALUE="[INSTALLDIR]" SYSTEM="Y">
<$/Component>


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Don't Repair Resources[Next]: Never Uninstall Resources


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday May 28 2022 at 3:11pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.