cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sutton
Level 3

Config files are deleted during the uninstallation

In my case, my application need some copy config files to CommonAppDataFolder during installing or upgrading, so I do this action at OnFirstUIBefore and OnResumeUIBefore. it works well at installtion, config files are copied to correct directoy,and then I uninstall the application, these config files were deleted during uninstallation process automatically(I expected config files leave it there after uninstallation). I have try many times, the results are the same. finally, I remove copy action code in OnFirstUIBefore and OnResumeUIBefore, and copy config file to CommonAppDataFolder mamually after installed application,and then remove the application, the config files did not be deleted. so i feel strange. someone could tell me what is root cause and how to fixed it? Thanks !!!
Labels (1)
0 Kudos
(3) Replies
KathyMorey
Level 10

Installers traditionally remove everything they installed, but not anything they did not.

You can change this behavior by marking the components containing those files as "permanent" to prevent them from being uninstalled.
0 Kudos
DebbieL
Level 17

If you're copying the files by using InstallScript code in the InstallScript events, you might want to try using Disable(LOGGING) before the copy code, and Enable(LOGGING) afterward.
0 Kudos
sutton
Level 3

yes, I used xcopyfile function. I will try this at once. Thanks very much, DebbieL!
0 Kudos