我需要这两个文件,PathwaysMDF和PathwaysLDF更换(重写)的旧副本上的重大升级。
好吧,这WiX的是推动我疯了。 设置文件完美的作品,但数据库文件仍无法正常工作! 我曾尝试几种方法?
下面是在尝试此与注册表项的代码:
<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>
这导致剩余的旧LDF文件,并没有 MDF文件存在一样,完成时,不老的一个,也不是新的。
下面是该日志称有关尝试:(完整的日志在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
下面是尝试此使用配套文件(主可执行程序,其版本)的代码:
<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>
这样做的结果是LDF文件表现完美,用新的,但是,MDF文件走了新老交替。 旧的和新的一样,下落不明。
下面是该日志称有关尝试:(完整的日志在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
我也曾尝试设置只是MDF文件的keyPath =“是”没有CompanionFile标签。 这也不能正常工作。