db file
Hi Guys.
I have a db file, the component of this file has next values in the property:
Condition:
?MYDBFILE.db <> 3 AND UPGRADE=0
and I have checked "Never overwrite if Key Path exists.
UPGRADE=0 (new install)
UPGRADE=1(upgrade)
So I expect this file to be installed only on new install and if htis file is not installed, which works fine, the only problem that it happend with the last upgrade, that this file was removed on upgrade. Any idea why.
LOG:
MSI (s) (D4:A4) [09:12:20:332]: Component: MYDBFILE.db; Installed: Absent; Request: Local; Action: Null
MSI (s) (D4:50) [09:19:23:266]: Component: MYDBFILE.db; Installed: Local; Request: Absent; Action: Absent
MSI (c) (08:84) [09:19:23:360]: Note: 1: 2262 2: Billboard 3: -2147287038
MSI (s) (D4:50) [09:19:23:376]: Note: 1: 1306 2: C:\TEST\MYDBFILE.db
Action 9:20:38: RemoveFiles. Removing files...
MSI (s) (D4:50) [09:20:38:029]: Executing op: ProgressTotal(Total=7,Type=1,ByteEquivalent=175000)
MSI (s) (D4:50) [09:20:38:029]: Executing op: SetTargetFolder(Folder=C:\TEST\)
MSI (s) (D4:50) [09:20:38:029]: Executing op: FileRemove(,FileName=MYDBFILE.db,,ComponentId={98C95035-0293-46F8-A9A7-83C2AB7C6BFA})
MSI (c) (08:84) [09:20:38:029]: Note: 1: 2262 2: Billboard 3: -2147287038
RemoveFiles: File: MYDBFILE.db
Directory: C:\TEST\
MSI (s) (D4:50) [09:20:38:029]: Verifying accessibility of file: MYDBFILE.db
Component not permanent
There is nothing in your code that prevents the file being removed on upgrade.
"Never overwrite if key path exists" does exactly what it states - it will not install a file if it already exists. It is an install condition.
?MYDBFILE.db <> 3 AND UPGRADE=0 is true when the component is not install and you are performing a new install. Once again, it is an install condition.
If you want this file to remain untouched on upgrade, then you can either work with UpgradeSync and the sequencing of the RemoveExistingProducts custom action, or more simply, just mark this component as permanent in addition to the "Never overwrite.." flag, and use a custom action conditioned to run only on uninstall (REMOVE="ALL") to delete the file when the application is fully uninstalled.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
I guess you could use the
I guess you could use the UPGRADINGPRODUCTCODE property in the earlier version as a condition to prevent the file from being deleted, would be "NOT UPGRADINGPRODUCTCODE" in your case
Would you like to reply?
Login or Register to post your comment.