Hello, I have modified the Sample Patch by Peter Marcu to test all the cases.
The MoveFile problem happens only if 1. Installer has UI 2. msiexec /update Patch.msp REINSTALL=ALL REINSTALLMODE=omus is used The sample has no UI, so the simplest command line installs the update. msiexec /update Patch.msp But, if we have UI, msiexec /update Patch.msp /passive does nothing. If I add REINSTALL & REINSTALLMODE my database is gone. Any ideas how to avoid REINSTALL & REINSTALLMODE and install the patch? Best regards, Ilya Slobodin -------------------------------------------------------------------------------- product.wxs <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="58F3D6A9-05B2-4CF8-BEAF-B838E51A6BB9" Name="WiX Patch MoveFiles Example Product" Language="1033" Version="1.0.0" Manufacturer="Spartak Corporation" UpgradeCode="48C49ACE-90CF-4161-9C6E-9162115A54DD"> <Package Description="Installs a file that will be patched and a database." Comments="This Product does not install any executables" InstallerVersion="200" Compressed="yes" /> <Media Id="1" Cabinet="product.cab" EmbedCab="yes" /> <FeatureRef Id="SampleProductFeature"/> </Product> <Fragment> <Feature Id="SampleProductFeature" Title="Sample Product Feature" Level="1"> <ComponentRef Id="Sample.txt" /> </Feature> <Feature Id="SampleDbFeature" Title="Sample Db Feature" Level="1"> <ComponentRef Id="SampleDb.txt" /> <Condition Level="0"> SKIP_DB </Condition> </Feature> </Fragment> <Fragment> <DirectoryRef Id="SampleProductFolder"> <Component Id="Sample.txt" Guid="{C28843DA-EF08-41CC-BA75-D2B99D8A1983}" DiskId="1"> <File Id="Sample.txt" Name="Sample.txt" Source=".\$(var.Version)\Sample.txt" /> </Component> <Component Id="SampleDb.txt" Guid="{90F16097-E218-4699-AFFC-9E36B20C8CCC}" DiskId="1"> <File Id="SampleDb.txt" Name="SampleDb.txt" Source=".\$(var.Version)\SampleDb.txt" /> <CopyFile Id="SampleDb.bak" SourceDirectory="SampleProductFolder" SourceName="SampleDb.txt" DestinationDirectory="SampleProductFolder" DestinationName="SampleDb.bak" Delete="yes" /> <RemoveFile Id="RemoveSampleDb.bak" Name="SampleDb.bak" On="uninstall"/> </Component> </DirectoryRef> </Fragment> <Fragment> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder" Name="PFiles"> <Directory Id="SampleProductFolder" Name="Patch Sample Directory"> </Directory> </Directory> </Directory> </Fragment> </Wix> -------------------------------------------------------------------------------- patch.wxs <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Patch AllowRemoval="no" Manufacturer="Dynamo Corp" MoreInfoURL="http://www.dynamocorp.com/" DisplayName="Sample Patch" Description="Small Update Patch" Classification="Update" > <Media Id="5000" Cabinet="RTM.cab"> <PatchBaseline Id="RTM"/> </Media> <PatchFamilyRef Id="SamplePatchFamily"/> </Patch> <Fragment> <PatchFamily Id='SamplePatchFamily' Version='1.0.0' Supersede='yes'> <ComponentRef Id="Sample.txt"/> </PatchFamily> </Fragment> </Wix> -------------------------------------------------------------------------------- make.bat if NOT EXIST 1.0 md 1.0 if NOT EXIST 1.1 md 1.1 if NOT EXIST Patch md Patch if NOT EXIST 1.0\Sample.txt echo 1.0 > 1.0\Sample.txt if NOT EXIST 1.0\SampleDb.txt echo Db-1.0 > 1.0\SampleDb.txt if NOT EXIST 1.1\Sample.txt echo 1.1 > 1.1\Sample.txt if NOT EXIST 1.1\SampleDb.txt echo Db-1.0 > 1.1\SampleDb.txt :: 1. Build Target Layout: candle.exe -dVersion=1.0 product.wxs light.exe -sval -xo Product.wixobj -out 1.0\Product.wixout light.exe 1.0\Product.wixout -out 1.0\Product.msi msiexec /a 1.0\Product.msi ROOTDRIVE=%~dp01.0\Admin :: 2. Build the Upgrade Layout: candle.exe -dVersion=1.1 product.wxs light.exe -sval -xo Product.wixobj -out 1.1\Product.wixout light.exe 1.1\Product.wixout -out 1.1\Product.msi msiexec /a 1.1\Product.msi ROOTDRIVE=%~dp01.1\Admin :: 3.a Create the wixout-based transform between your products: torch.exe -p -xi 1.0\Product.wixout 1.1\Product.wixout -out Patch\Diff.Wixmst :: 3.b Create the admin-image-based transform between your products: torch.exe -p -ax TorchBinaries -xo -t patch 1.0\Admin\Product.msi 1.1\Admin\Product.msi -out Patch\DiffAdmin.Wixmst :: 4. Build the Patches: candle.exe Patch.wxs light.exe Patch.wixobj -out Patch\Patch.WixMsp pyro.exe Patch\Patch.WixMsp -out Patch\Patch.msp -t RTM Patch\Diff.wixmst pyro.exe Patch\Patch.WixMsp -out Patch\PatchAdmin.msp -t RTM Patch\DiffAdmin.wixmst -------------------------------------------------------------------------------- ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users