Wix installer does not overwrite previous version of an executable -


i have simple installer - copy single dll program files subfolder , register regsvr32.exe. works great, if older version of dll installed, "repair" not overwrite existing dll. dll signed , version (build) number incremented (e.g. 2.0.0.123 - > 2.0.0.124).

looking @ previous similar posts, added removeexistingproducts , specified productid "*". uninstalling , installing newer version works fine, need repair update existing dll.

is there else need do?

thank you!

<?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/utilextension">    <!-- when creating new install next version, these fields must modified -->   <?define productversion = "2.0.00" ?>    <?define productid64 = "*" ?>   <?define productid32 = "*" ?>    <?define packageid   = "45f34788-66ac-441c-b666-707ffa7f1ee9" ?>     <!-- product name want appear in add/remove programs-->   <?if $(var.platform) = x64 ?>   <?define productname = "xyz (64 bit)" ?>   <?define win64 = "yes" ?>   <?define platformprogramfilesfolder = "programfiles64folder" ?>   <?define productid = "$(var.productid64)" ?>   <?define maindllname = "xyz64.dll" ?>   <?define maindllsource = "..\..\bin\win64\release\xyz64.dll" ?>   <?else ?>   <?define productname = "xyz (32 bit)" ?>   <?define win64 = "no" ?>   <?define platformprogramfilesfolder = "programfilesfolder" ?>   <?define productid = "$(var.productid32)" ?>   <?define maindllname = "xyz.dll" ?>   <?define maindllsource = "..\..\bin\win32\release\xyz.dll" ?>   <?endif ?>     <?define upgradecode = "{c3763742-7c1c-4ab7-a404-f030b7550e97}" ?>     <product id="$(var.productid)" name="$(var.productname)" language="1033" version="$(var.productversion)" manufacturer="advanced messaging systems llc" upgradecode="$(var.upgradecode)">      <package id="$(var.packageid)" installerversion="200" compressed="yes" description="xyz installer package"  installprivileges="elevated"/>      <!-- no restore point  -->     <property id="msifastinstall" value="3" />     <media id="1" cabinet="media1.cab" embedcab="yes" />      <directory id="targetdir" name="sourcedir">       <directory id="$(var.platformprogramfilesfolder)">         <directory id="installlocation" name="xyz">            <component id="xyzdll" guid="e2cbee41-6c0e-4a84-95c1-7282747b4a3d">             <file id='maindll' name="$(var.maindllname)" diskid='1' source="$(var.maindllsource)" selfregcost="0" />              <!-- todo: insert files, registry keys, , other resources here. -->           </component>          </directory>       </directory>     </directory>      <property id="wixui_installdir" value="installlocation" />      <!-- note: custom actions install/uninstall dll using regsvr32.exe -->     <customaction id="registerdll"                       directory="installlocation"                       execommand='regsvr32.exe /s "[installlocation]$(var.maindllname)"'                        return="check">     </customaction>     <customaction id="unregisterdll"                   directory="installlocation"                   execommand='regsvr32.exe /s /u "[installlocation]$(var.maindllname)"'>     </customaction>       <feature id="productfeature" title="xyz" level="1">       <componentref id="xyzdll" />       <!-- note: following componentgroupref required pull in generated authoring project references. -->       <componentgroupref id="product.generated" />     </feature>      <installuisequence>       <custom action="wixcloseapplications" before="appsearch"/>     </installuisequence>      <installexecutesequence>        <!-- uninstall previous version before installing one. -->       <removeexistingproducts before="installinitialize"/>         <selfregmodules/>     </installexecutesequence>      <icon id="xyz.ico" sourcefile="..\graphics\xyz.ico"/>     <property id="arpproducticon" value="xyz.ico" />      <!-- ui -->     <uiref id="wixui_installdir"/>     <uiref id="wixui_errorprogresstext" />      <wixvariable id="wixuilicensertf" value="..\eula\license.rtf" />     <wixvariable id="wixuibannerbmp"  value="..\graphics\banner.jpg" />     <wixvariable id="wixuidialogbmp"  value="..\graphics\logo.jpg" />       <!-- end ui -->   </product> </wix> 

update. following worked me after modifying upgrade entries:

<?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/utilextension">    <!-- when creating new install next version, these fields must modified -->   <?define productversion = "2.0.4" ?>    <?define productid64 = "*" ?>   <?define productid32 = "*" ?>    <?define packageid   = "*" ?>     <!-- product name want appear in add/remove programs-->   <?if $(var.platform) = x64 ?>   <?define productname = "xyz (64 bit)" ?>   <?define win64 = "yes" ?>   <?define platformprogramfilesfolder = "programfiles64folder" ?>   <?define productid = "$(var.productid64)" ?>   <?define maindllname = "xyz64.dll" ?>   <?define maindllsource = "..\..\bin\win64\release\xyz64.dll" ?>   <?else ?>   <?define productname = "xyz (32 bit)" ?>   <?define win64 = "no" ?>   <?define platformprogramfilesfolder = "programfilesfolder" ?>   <?define productid = "$(var.productid32)" ?>   <?define maindllname = "xyz.dll" ?>   <?define maindllsource = "..\..\bin\win32\release\xyz.dll" ?>   <?endif ?>     <?define upgradecode = "{c3763742-7c1c-4ab7-a404-f030b7550e97}" ?>     <product     id="$(var.productid)"     name="$(var.productname)"     language="1033"     version="$(var.productversion)"     manufacturer="advanced messaging systems llc"     upgradecode="$(var.upgradecode)"     >      <package id="$(var.packageid)"              installerversion="200"              compressed="yes"              description="xyz installer package"              installprivileges="elevated"      />      <!-- no restore point  -->     <property id="msifastinstall" value="3" />       <upgrade id="$(var.upgradecode)">       <upgradeversion minimum="1.0.0"                       includeminimum="yes"                       onlydetect="no"                       maximum="$(var.productversion)"                       includemaximum="no"                       property="previousfound" />     </upgrade>       <media id="1" cabinet="media1.cab" embedcab="yes" />      <directory id="targetdir" name="sourcedir">       <directory id="$(var.platformprogramfilesfolder)">         <directory id="installlocation" name="xyz">            <component id="xyzdll" guid="e2cbee41-6c0e-4a84-95c1-7282747b4a3d">             <file id='maindll' name="$(var.maindllname)" diskid='1' source="$(var.maindllsource)" selfregcost="0" />              <!-- todo: insert files, registry keys, , other resources here. -->           </component>          </directory>       </directory>     </directory>      <property id="wixui_installdir" value="installlocation" />      <!-- note: custom actions install/uninstall dll using regsvr32.exe -->     <customaction id="registerdll"                       directory="installlocation"                       execommand='regsvr32.exe /s "[installlocation]$(var.maindllname)"'                        return="check">     </customaction>     <customaction id="unregisterdll"                   directory="installlocation"                   execommand='regsvr32.exe /s /u "[installlocation]$(var.maindllname)"'>     </customaction>       <feature id="productfeature" title="xyz" level="1">       <componentref id="xyzdll" />       <!-- note: following componentgroupref required pull in generated authoring project references. -->       <componentgroupref id="product.generated" />     </feature>      <installuisequence>       <custom action="wixcloseapplications" before="appsearch"/>     </installuisequence>      <installexecutesequence>       <removeexistingproducts after="installinitialize"/>        <selfregmodules/>      </installexecutesequence>      <icon id="xyz.ico" sourcefile="..\graphics\xyz.ico"/>     <property id="arpproducticon" value="xyz.ico" />      <!-- ui -->     <uiref id="wixui_installdir"/>     <uiref id="wixui_errorprogresstext" />      <wixvariable id="wixuilicensertf" value="..\eula\license.rtf" />     <wixvariable id="wixuibannerbmp"  value="..\graphics\banner.jpg" />     <wixvariable id="wixuidialogbmp"  value="..\graphics\logo.jpg" />       <!-- end ui -->   </product> </wix> 

if want major uprade, start wix majorupgrade element. general rules upgrade are:

  1. different productcode , packagecode older product.
  2. increment productversion somewhere in first 3 fields.
  3. same upgradecode older product.
  4. do (like wix majoruprade or upgrade elements) ensure have upgrade in place.
  5. a per user install not upgrade per system install, or vice versa.

in original case, failure follow rules 1 , 2 meant windows thought same product installed , went repair mode. should have been first warning because major upgrade looks fresh install, not repair. if have 2 entries in programs&features means 1 or more of 4 requirements has not been met. if "another version of product installed" means didn't follow rule 1, , variations in behavior productcode , packagecode values compared installed product.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -