The Problem:
I need both these files, PathwaysMDF and PathwaysLDF to replace (overwrite) the old copies on a major upgrade.
Okay, this WiX is driving me crazy. The settings file works perfectly, however the database files are still not working! I have tried several approaches...
Here is the code attempting this with the registry key:
<Component Id="Database" Guid="1D8756EF-FD6C-49BC-8400-299492E8C65D" >
<RegistryValue Root="HKLM" Key="Software\TDR\Pathways\Database" Name="installed" Type="integer" Value="1" KeyPath="yes" />
<File Id="pathwaysMdf" Name="Pathways.mdf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.mdf" />
<File Id="pathwaysLdf" Name="Pathways_log.ldf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.ldf"/>
</Component>
This results in the old LDF file remaining, and no MDF file there at all, when completed, not the old one, nor the new one.
Here is what the log says about that attempt: (complete log at http://pastebin.com/a8a7uKfL)
MSI (s) (C8:80) [09:01:51:845]: Executing op: SetTargetFolder(Folder=C:\Documents and Settings\All Users\Application Data\Pathways)
MSI (s) (C8:80) [09:01:51:845]: Executing op: SetSourceFolder(Folder=1\ykpqggg9\Pathways\|CommonAppData\Pathways)
MSI (s) (C8:80) [09:01:51:845]: Executing op: FileCopy(SourceName=x_gekdq7.ldf|Pathways_log.ldf,SourceCabKey=pathwaysLdf,DestName=Pathways_log.ldf,Attributes=512,FileSize=40239104,PerTick=32768,,VerifyMedia=1,,,,,CheckCRC=0,,,InstallMode=58982400,HashOptions=0,HashPart1=-403787921,HashPart2=771061375,HashPart3=-1732951415,HashPart4=-1390528611,,)
MSI (s) (C8:80) [09:01:51:845]: File: C:\Documents and Settings\All Users\Application Data\Pathways\Pathways_log.ldf; Won't Overwrite; Won't patch; Existing file is unversioned but modified
MSI (s) (C8:80) [09:01:51:845]: Executing op: FileCopy(SourceName=Pathways.mdf,SourceCabKey=pathwaysMdf,DestName=Pathways.mdf,Attributes=512,FileSize=156368896,PerTick=32768,,VerifyMedia=1,,,,,CheckCRC=0,,,InstallMode=58982400,HashOptions=0,HashPart1=570808063,HashPart2=-1571218748,HashPart3=-867678845,HashPart4=601212343,,)
MSI (s) (C8:80) [09:01:51:845]: File: C:\Documents and Settings\All Users\Application Data\Pathways\Pathways.mdf; Won't Overwrite; Won't patch; Existing file is unversioned but modified
Here is the code attempting this using a companion file (the main program executable, which is versioned):
<Component Id="Database" Guid="1D8756EF-FD6C-49BC-8400-299492E8C65D" >
<File Id="pathwaysMdf" Name="Pathways.mdf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.mdf" CompanionFile="pathwaysExe" />
<File Id="pathwaysLdf" Name="Pathways_log.ldf" DiskId="1" Source="\\fileserver\Shared\Databases\Pathways\SystemDBs\Pathways.ldf" CompanionFile="pathwaysExe" />
</Component>
The result of this is that the LDF file behaves perfectly, replacing the old with the new, however, the MDF file is GONE. Old one and new one alike, missing.
Here is what the log says about that attempt: (complete log at http://pastebin.com/gijLN5QY):
MSI (s) (C8:F8) [09:21:55:206]: Executing op: SetCompanionParent(ParentPath=C:\Program Files\Pathways\,ParentName=Pathways.exe,ParentVersion=1.1.5.0,ParentLanguage=0)
MSI (s) (C8:F8) [09:21:55:206]: Executing op: FileCopy(SourceName=Pathways.mdf,SourceCabKey=pathwaysMdf,DestName=Pathways.mdf,Attributes=512,FileSize=156368896,PerTick=32768,,VerifyMedia=1,,,,,CheckCRC=0,Version=pathwaysExe,,InstallMode=58982400,,,,,,,)
MSI (s) (C8:F8) [09:21:55:236]: File: C:\Documents and Settings\All Users\Application Data\Pathways\Pathways.mdf; Overwrite; Won't patch; Existing file is of an equal version (Checked using version of companion: C:\Program Files\Pathways\Pathways.exe)
MSI (s) (C8:F8) [09:21:55:236]: Source for file 'pathwaysMdf' is compressed
InstallFiles: File: Pathways.mdf, Directory: C:\Documents and Settings\All Users\Application Data\Pathways\, Size: 156368896
MSI (s) (C8:F8) [09:21:55:246]: Re-applying security from existing file.
MSI (s) (C8:F8) [09:21:55:246]: Verifying accessibility of file: Pathways.mdf
MSI (s) (C8:F8) [09:21:55:266]: Note: 1: 2318 2: C:\Documents and Settings\All Users\Application Data\Pathways\Pathways.mdf
MSI (s) (C8:F8) [09:21:55:266]: Note: 1: 2360
MSI (s) (C8:F8) [09:21:55:266]: Note: 1: 2360
I have also tried setting just the MDF file to KeyPath="yes" without the CompanionFile tag. This also isn't working. Please, any suggestions? THANK YOU!