cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mohit_raghav
Level 4

Component Issue

I have an issue with the xml file. It always get overwritten even if I have set the property of the component not to overwrite. I have a Custom action which copies the old xml into the folder below MoveFiles in installation sequence.

Requirements:
1. Custom action copies the old xml file from a location on the computer to InstallDir. It runs after folder creation
2. Using XML File changes I add an entry in the existing xml file
3. If the xml file exists, then the installer should not over write is. Xml compoenent has following properties: Permanent= Yes, Never overwrite: Yes, Shared: Yes. I also added a condition on this component but it is still overwritten!

Msi log:
MSI (s) (78:90) [14:06:25:149]: Executing op: FileCopy(SourceName=MYINST~1.XML|MyInstallerConfig.xml,SourceCabKey=MyInstallerConfig.xml,DestName=MyInstallerConfig.xml,Attributes=16384,FileSize=920,PerTick=32768,,VerifyMedia=1,,,,,CheckCRC=0,,,InstallMode=58982400,HashOptions=0,HashPart1=1306479969,HashPart2=-2047967510,HashPart3=1994943320,HashPart4=642583378,,)
MSI (s) (78:90) [14:06:25:159]: File: C:\Program Files\MyInstaller\MyInstallerConfig.xml; Overwrite; Won't patch; Existing file is unversioned and unmodified - hash doesn't match source file
MSI (s) (78:90) [14:06:25:159]: Source for file 'MyInstallerConfig.xml' is compressed
InstallFiles: File: MyInstallerConfig.xml, Directory: C:\Program Files\MyInstaller\, Size: 920
MSI (s) (78:90) [14:06:25:159]: Re-applying security from existing file.
MSI (s) (78:90) [14:06:25:159]: Verifying accessibility of file: MyInstallerConfig.xml


Thanks in advance for you help.
Labels (1)
0 Kudos
(1) Reply
cydz1985
Level 3

Try reading file versioning rules.
http://msdn.microsoft.com/en-us/library/aa368599(v=vs.85).aspx

This might help.
0 Kudos